If Variable


Conditionally plays a set of steps based on the result of testing the variable value.

Parameters

  • Variable Specifies the name of variable to be evaluated.

  • Comparison operator Specifies the comparison operator, and it should be Equal, Not equal, Less than, Greater than, Contain and Not contain.

  • Value for comparing Specifies an expression of value.

  • Match case for string value Specifies whether to distinguish between uppercase and lowercase characters if the variable holds a string value.

Remark:

Since the variable can hold many types of value, such as string, number or date-time, Macro Player will be applied to the following evaluation rule:

Operator Rule
Equal If the option 'As a string' is checked, Macro Player considers the value as a string and then to evaluate the logical expression, otherwise, Macro Player will convert the value to number before evaluating.

Example:
if 'As a string' is checked, the variable holds a string value "12.05" and the parameter 'value' is "12.0500", Macro Player directly compares "12.05" and "12.0500" and gets the result FALSE.

if 'As a string' is unchecked, Macro Player first converts "12.05" to a number 12.05, and converts "12.0500" to a number 12.05, and then evaluates the expression "12.05 equal 12.05", the result will be TRUE.

Not equal Same as Equal
Less than Value will be converted into a number to evaluate.

Example:
if the variable holds a string value "abc" and the parameter 'value' is "34jdc", Macro Player will convert "abc" to number "0" and "34jdc" to number "34", and then evaluate the logical expression "0 less than 34", the result will be TRUE.

Greater than Same as Less than
Contain Value will be as a string to evaluate.

Example:
if the variable holds a number "1234" and the parameter 'value' is "34", Macro Player will evaluate the logical expression to the result TRUE.

Not contain Sames as Contain