@Do (Formula Language)

Evaluates expressions from left to right, and returns the value of the last expression in the list.

Syntax

@Do( expressions )

Parameters

expressions

Any number of expressions that you want @Do to evaluate. Separate multiple expressions with semicolons: expression1 ; expression2 ; expression3

Return value

lastExpression

The value of the last expression.

Usage

This function is useful in agents, hotspot buttons, and toolbar buttons and when you want to execute multiple expressions from within a single @function. It does not work in column or selection formulas.

Examples

This formula displays a dialog box asking whether the user wants to edit the current document. If the user selects Yes, another dialog box appears, prompting for the user's name. If the user now selects Cancel, the formula stops execution; if the user enters a name and selects OK, the document is opened in Edit mode.

If the user selects No at the first dialog box, a different one follows it. This time, a message appears noting that the user chose not to edit the document, and Domino® navigates to the next document in the view.

@If(@Prompt([YESNO]; "Question";
"Edit this document?");
@If(@Prompt([OKCANCELEDIT]; "Positive Response";
"You have chosen to edit this document. Select OK if the name below is correct.";
@UserName) != "ERR_CANCEL";
@Command([EditDocument]);@Return(""));
@Do(@Prompt([OK]; "Negative Response";
"You have chosen not to edit this document. Select OK to continue to the next document.");
@Command([NavNext])))