Page tree

Operators

The following operators can be used throughout the system in Formulas.

Operator

Definition

*multiply
/divide
+add
-subtract

==

equals

!=

not equals

>=

greater or equal to

<=

less than or equal to

>

greater than

<

less than

~=contains

!~=

does not contain

The operator !~= will not work in Document Templates.  As an alternative, you can use ~= as a "contains", inside of an extra set of parentheses with an exclamation point in front of it as a "not".  For instance, instead of something like $startif($field_name !~= "substring"), you can try something like $startif(!($field_name ~= "substring"))

Variable Formula fields use a slightly modified syntax and list of operators. For more information, see Variable Formula Fields.

Logical Operators

You can combine formula criteria using logical operators such as AND and OR. These are:

OperatorDefinitionExample
||Or($priority == High || $priority == Low)
&&And($contract_amount >= 50000 && $approval_required == 'Yes')


Order of Operations

Formula expressions are evaluated from left to right. Use parentheses to group terms and define the order of execution. For example, A && (B || C) will evaluate to true if A is true, and also B or C is true. In contrast, A && B || C will evaluate true if A and B are true, OR if C is true.

  • No labels