FORMULA LANGUAGE


Accessing the current database and view
Example

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.

FunctionDescription
@DbManagerReturns the users, groups, and servers that currently have manager access to the database. Returns a list.
@DbNameReturns the names of the current Domino server and database. Returns a 2-element list.
@DbTitleReturns the title of the current database.
@ReplicaIDReturns the replica ID of the current database
@ServerNameReturns the name of the server containing the current database.
@ViewTitleReturns 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.

For details on more advanced formulas for columns, see Advanced options for columns.

FunctionDescription
@DocChildrenReturns the number of immediate children of the current document.
@DocChildren(def)As above, but returns def. Use % in def to represent the number.
@DocChildren(zero; def)As above, but returns zero if there are no children.
@DocChildren(one, zero; def)As above, but returns one if there is one child.
@DocDescendantsReturns the number of descendants, including children and children of children, of the current document.
@DocDescendants(def)As above, but returns def. Use % in def to represent the number.
@DocDescendants(zero; def)As above, but returns zero if there are no descendants.
@DocDescendants(one, zero; def)As above, but returns one if there is one descendant.
@DocLevelReturns the level of the current document in the current view.
@DocNumberReturns the number of the current document or category within the current view.
@DocNumber(sep)As above, but separates the components of the number with sep rather than a period.
@DocNumber("")As above, but returns only the rightmost component of the number.
@DocParentNumberReturns the number of the parent of the current document or category within the current view.
@DocParentNumber(sep)As above, but separates the components of the number with sep rather than a period.
@DocParentNumber("")As above, but returns only the rightmost component of the number.
@DocSiblingsReturns the number of documents that are at the same level as the current document, including the current document.
@IsCategoryReturns an asterisk if any field to the right of the current field in the current row is a category.
@IsCategory(True)Same as above, but returns True instead of an asterisk.
@IsCategory(True; False)Same as above, but returns False if no fields are categories.
@IsExpandableReturns a plus sign if the current row is expandable.
@IsExpandable(True)Same as above, but returns True instead of a plus sign.
@IsExpandable(True; False)Same as above, but returns False if the row is not expandable.
@ResponsesReturns the number of responses in the current view to the current document. WindowTitle formulas only.

Example
See Also