Compare Variables State
Compares the values of two variables, for string equality.
- Variable 1 – name of a session variable, or a constant value.
- Variable 2 – name of a session variable, or a constant value.
Follow-up State – OK
The values of Variable 1 and Variable 2 are equal.
Follow-up State – Fail
- The values of Variable 1 and Variable 2 are not equal, or
- Either Variable 1 or Variable 2 is the name of a session variable that does not exist.
Follow-up State – Dynamic
In this example, if the values of TEMP and VAR2 are equal, the application proceeds to the Send Variable Values - Equal state; if unequal, or either session variable does not exist, proceeds to the Send Variable Values - Not Equal state.
This state compares only for string equality. For comparing other types, use the Compare Typed Variables state.
The sample application below compares the session variable ACCOUNT to a constant value. If the two values are unequal, the Validate Account Using Copy Variable state is called to copy the ACCOUNT session variable to a dummy session variable. If copying fails, the ACCOUNT session variable does not exist.