Boolean, comparison, and math operators

You can use a variety of Boolean, comparison, and math operators to build an expression.

Boolean operators

Table 1. Boolean operators in the Expression Builder
Operator Definition Example
And Returns TRUE when all conditions are true. Look for transactions that have a price per share greater than $99.99 AND were processed on June 15, 2001 AND were for accounts in New York.
Or Returns TRUE when at least one of the conditions is true. Look for transactions that have a price per share greater than $99.99 OR were processed on June 1, 2001 OR were for accounts in New York.

Comparison operators

The following comparison operators are available. They are listed in their order of precedence.

  • Equal
  • Not Equal

    This is available only in the Simple Event component.

  • Greater Than
  • Greater Than or Equal To
  • Less than
  • Less Than or Equal To
  • Like

Math operators

The following math operators are available. They are listed in their order of precedence.

  • Multiply
  • Divide
  • Add
  • Subtract
  • Modulo (finds the remainder of division of one number by another)
  • Exp (raises a number to the power of another number)

Order of operations

This is the order of precedence for operators.

  • multiplication
  • division
  • addition
  • subtraction

If you use a comparison in an expression that uses a Boolean operator, you must enclose the operand that follows the Boolean operator in parentheses whenever the result of the calculation would be ambiguous if you do not use parentheses. For example, you would need parentheses to clarify whether you want trans.frequency < 3 AND trans.deposit > 2 * (prev.deposit + 50) or trans.frequency < 3 AND trans.deposit > (2 * prev.deposit) + 50.