Accessing the current database and view
You have immediate access to the database in which the formula is running, except for toolbar button formulas, which have no database context. You have immediate access to the view in which the formula is running if you are in the context of a view. In the context of a document, you have immediate access to the view from which the document was opened.
Database and view attributes
The following table lists @functions that return database and view attributes.
Function |
Description |
---|---|
@DbManager |
Returns the users, groups, and servers that currently have manager access to the database. Returns a list. |
@DbName |
Returns the names of the current Domino® server and database. Returns a 2-element list. |
@DbTitle |
Returns the title of the current database. |
@ReplicaID |
Returns the replica ID of the current database |
@ServerName
|
Returns the name of the server containing the current database. |
@ViewTitle |
Returns the title of the current view. |
Window title and column formula @functions
A number of @functions provide response hierarchy and other information on views. In a view, main documents are numbered 1, 2, 3, and so forth. Each set of response or response-to-response documents have second and third numbers starting at 1. By default, the complete number for a response document appears as a decimal. For example, the second response to the third document is document number 3.2 in the view; the first response to the second response is document number 3.2.1.
These @functions work only in Window Title and Column formulas, and some, as noted, are restricted to either one or the other. The return value in every case is a string.
Function |
Description |
---|---|
@DocChildren |
Returns the number of immediate children of the current document. |
@DocChildren(def) |
As listed previously, but returns def. Use % in def to represent the number. |
@DocChildren(zero; def) |
As listed previously, but returns zero if there are no children. |
@DocChildren(one, zero; def) |
As listed previously, but returns one if there is one child. |
@DocDescendants |
Returns the number of descendants, including children and children of children, of the current document. |
@DocDescendants(def) |
As listed previously, but returns def. Use % in def to represent the number. |
@DocDescendants(zero; def) |
As listed previously, but returns zero if there are no descendants. |
@DocDescendants(one, zero; def) |
As listed previously, but returns one if there is one descendant. |
@DocLevel |
Returns the level of the current document in the current view. |
@DocNumber |
Returns the number of the current document or category within the current view. |
@DocNumber(sep) |
As listed previously, but separates the components of the number with sep rather than a period. |
@DocNumber("") |
As listed previously, but returns only the last component of the number. |
@DocParentNumber |
Returns the number of the parent of the current document or category within the current view. |
@DocParentNumber(sep) |
As listed previously, but separates the components of the number with sep rather than a period. |
@DocParentNumber("") |
As listed previously, but returns only the last component of the number. |
@DocSiblings |
Returns the number of documents that are at the same level as the current document, including the current document. |
@IsCategory |
Returns an asterisk if any field following the current field in the current row is a category. |
@IsCategory(True) |
Same as listed previously, but returns True instead of an asterisk. |
@IsCategory(True; False) |
Same as listed previously, but returns False if no fields are categories. |
@IsExpandable |
Returns a plus sign if the current row is expandable. |
@IsExpandable(True) |
Same as listed previously, but returns True instead of a plus sign. |
@IsExpandable(True; False) |
Same as listed previously, but returns False if the row is not expandable. |
@Responses |
Returns the number of responses in the current view to the current document. WindowTitle formulas only. |