Edit

Comparison (Relational) Operators

The comparison operators result in either a true or false value. The MoneyWorks Forms Designer makes no distinction between these Boolean values and ordinary numbers. Thus the result of a comparison operation may be treated as a number.

True is equivalent to 1, and 0 is equivalent to false.

The operands for the comparison operators must be of the same type. If you supply operands of different types, one of the operands will be promoted to the type of the other, according to the following rules:

If either operand is a string, the other will be converted to a string. If either operand is a number (but neither is a string), the other will be converted to a number.

For example, the comparison:

7 < "five"

results in the left-hand operand being converted to a string, thus:

"7" < "five"

and, since “7” is less than “five” alphabetically, the result is true.

SymbolOperationUsage
=, ==equalityA = B
The result is true (1) if A is equal to B. Otherwise the result is false (0). This applies to numbers, strings and dates. For strings, the comparison is case-insensitive. Thus "The Same" = "THE SAME" is true. Use the double form of the operator to avoid wildcard searches (e.g. when searching for an email address, where the @ would otherwise be considered a wildcard character, resulting in unwanted matches).
!=, <>inequalityA <>B
The result is true (1) if A is not equal to B. Otherwise the result is false (0).
<less thanA < B
For numbers, the result is true if A is smaller than B.For strings, the result is true if A is alphabetically before B. Thus "Alpha" < "Beta" is true.For dates, the result is true if the date A is earlier than the date B.
>greater thanA > B
<=less than or equal toA <=B
>=greater than or equal toA >=B