Menu

Comparison operators

Comparison operators are mathematical operators that enable the rule engine to compare the value of the attribute and the comparison value captured.

Comparison operators are to be used according to the type of attribute selected.

Type Operators
Integer (numeric value without decimal) = | != | IN | NOT IN | < | > | <= | >=
Double (numeric value with decimals) = | != | IN | NOT IN | < | > | <= | >=
String = | != | IN | NOT IN
Boolean (true, false) = | !=

Operators  = , != , > , < , >= et <= are followed by a single comparison value. 

Operators IN and NOT IN are followed by a list of comparison values.
A list of values is surrounded by parentheses and values inside the list are separated by commas.

Example:

REFUSE if #currency NOT IN ('EUR', 'USD', 'GBP', 'CHF')

Explanation: The previous example refuses all payments whose currency is not the Euro, US dollar, Pound Sterling or Swiss franc.

This syntax avoids drawing up several rules or conditions in the same rule.

Example:

REFUSE if #card_country IN ('ITA', 'AFG')

is equivalent to:

REFUSE if #card_country = 'ITA' and #card_country = 'AFG'