@DocLevel (Formula Language)

Returns a text string that represents the level of the document or category.

Syntax

@DocLevel

Return value

level

Special text. The level of the document or category. You cannot convert special text to a number.

Usage

Use @DocLevel in column and window title formulas. If you use it in a window title or field formula, it will always evaluate to "1" until the document has been saved and reopened. This function does not work in any other formula.

This @function is calculated when the document is opened. Results are undefined in cases where the document is not opened, such as printing from a view.

You cannot use this function in Web applications.

Examples

  1. This example of a category returns 1.
    @DocLevel
  2. This example of a main document in a category returns 2.
    @DocLevel
  3. This example of a response document in a category returns 3.
    @DocLevel
  4. This example of a main document that is not in a category returns 1.
    @DocLevel