FORMULA LANGUAGE


Using conditional statements
Example

@If lets you execute one statement or another, depending on whether a condition is True or False. A condition is typically the comparison of values, but can also be a constant, a variable, or the result of an @function. For example:


The @If statement has an odd number of parameters with a minimum of three, as follows:
The simplest @If statement has the following syntax:
An @If statement with three conditions has the following syntax:
The @If function is evaluated left to right, and the first condition that is True causes its corresponding True statement (that is, the next parameter) to be processed. No further evaluation or processing within the @If statement takes place. If none of the conditions are True, the False statement (that is, the last parameter) is processed.

The True and False statements take various forms, depending on their context:


Assignments for True and False statements take two forms:
The parameters of @If can themselves be @If statements. Nested @If statements are useful to work around the limited logic constructs in the formula language, but make for complicated syntax.

The @Do function provides a means to execute multiple statements on a True or False condition.

Example
See Also