Expression and operator examples

This section provides examples of using different operators to build expressions.

Modulus example

Use the MOD (modulus) operator button (shown as MOD in the expression) when you need to calculate the value of the remainder of a division operation.

For example, if you want to validate that a transaction amount is in ten dollar increments, you could create a Math expression like this: TranAmount MOD 10.00

This Math component returns the remainder left when you divide the value of the TranAmount field by 10.

Then you could use the Math expression in a Simple component that compares the value created by the Math expression to zero. The Math expression returns a value of zero for transaction amounts in even 10 dollar increments. The Math expression returns a value greater than zero for all other transaction amounts.

AND expression example

This example shows a simple AND expression.

Look for:

transactions that have a price per share greater than $99.99

AND

are for accounts from New York

AND

were processed today

AND with OR expressions example

This example shows an AND expression with OR expressions.

Look for:

accounts from New York OR from New Jersey OR from Connecticut that had transactions processed within the last calendar week

AND

the price per share was greater than $99.99