Developer

Compare Variables State

Compares the values of two variables, for string equality.

Input Variables

For both input variables, if the corresponding check box is selected, the application assumes the value is the name of a session variable; otherwise, the value is treated as a constant.
  • Variable 1 – name of a session variable, or a constant value.
  • Variable 2 – name of a session variable, or a constant value.

Output Variables

None.

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

Not applicable.

State Editor

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.


Compare Variables State

Notes

This state compares only for string equality. For comparing other types, use the Compare Typed Variables state.

Usage

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.


Compare Variables Error Handling