Developer

Logical Functions for Rules

Provides the decision making and comparison logic to a rule.

The Logical category of rule function terms within the rule definition provide the decision making and comparison logic to a rule. Many, though not all, of these functions support the Boolean return type and will return true or false in this context based on some decision or comparison. The functions within this category provide behaviors including conjunctions, value comparisons, and if-then-else if and switch-case logic.

Unlike similar constructs in other development tools, many of the functions within the logical category support more than two arguments. As an example, the @AND function will take two or more arguments, returning true only when all of its arguments are true. In other development languages to provide similar logic, multiple operators may be needed, as in:
if (value1 && value2 && value3 && value4)
Here the presence of multiple and operators are required. In the rule functions, the same logic would use a single @AND function call, with each value passed as an argument to the function:
AND (value1, value2, value3, value4)

Many of the other functions provide similar support within the context of their behavior.