Feature Rich
Rapid Application Development
Helping you or your customers
Manage their Business

All Commands All Math & Logic
Commands

COMPARE

You can use this command to compare two values and return TRUE or FALSE.
You can also use it as an inline if statement instead of the {IIF()} command.

Using this command will usually speed up execution time as the system doesn't need to process the expression.

While you can often simply use something like {V_X} != {V_Y} in an IF statement, it is sometimes better to use {COMPARE(V_X, != , V_Y)}.
If the variable V_X was empty and the variable V_Y contained the value "10" then the expression {V_X} != {V_Y} would end up as " != 10" and could yield unpredictable results.

Using the COMPARE command, and for the same reason, the {EMPTY()} command, produces a predictable result.

Number Name Default Type Description
1 value1 String The first value
2 method = String The comparison method to use: =, ==, !=, <>, <=, >=, $, !$
3 value2 String The second value
4 true TRUE String The value to return if the comparison is true.
5 false FALSE String The value to return if the comparison is false
Example
TRUE
TRUE
FALSE
FALSE
TRUE
TRUE
to add a Comment.
IF Commands
ELSE
ELSE_IF
EMPTY
IF
IIF
TOT_IF