Subject: Fundamental help pls
“Is it possible to display all the roles in a notes database acl using Formula language?”
No.
“I can see the attachments in $File reserved field. How can i access it?”
Just like any other RichText item. GetFirstItem will do.
“I’ve around 25 @DBLookup functions in a form. While opening the form… it is getting slow.”
Well, obviously, reduce the number of lookups, in the first place.
If you retrieve different field values from the same document, don’t do one @DbLookup per field. Instead, build a view that concatenates all values you need into one string, using a column value like:
Field1 + “|#~” + Field2 + “|#~” + Field3 + …
The separator could be anything, it doesn’t have to be “|#~”, but it should be a string that will never occur in any of the field values. Now, use one @DbColumn to retrieve all those values and separate them in you form, e.g. using @Word:
@Word(lookupResult; “|#~”; 1)
@Word(lookupResult; “|#~”; 2)
and so on. Doing only one lookup and some string operations is much faster than doing multiple lookups.
In general, don’t write you lookups to to retrieve field values, but to retrieve column values. It’s faster.
Don’t use “NoCache” where it is not needed. Also have a look into the “ReCache” option, if you absolutely need up-to-date results. Refreshing the cache once and retrieving cached results from then on might just be all you need.
If you use error checking for the results of @DbLookup, make sure that you don’t execute it twice. Assign the the result to a temporary variable, check this for an error condition and use the temporary variable if no error occurred. Also look into the [FailSilent] option for @DbLookup which can often help to keep the code slick.