Test Variables

This action tests the value of one or more variables to determine whether execution should continue down the current branch or if something else should be done. The action is useful for checking that the value in an extracted variable are valid. For example, the action can be used to check that an extracted variable matches the value in an input variable.

To specify the test, add one or more variable conditions. Each variable condition compares the value of a selected variable against another value. Depending on the outcome of the comparisons, and on your selection in the If property, execution will either continue down the current branch or be affected as indicated by the Do property.

Properties

The Test Variables action is configured using the following properties:

Conditions:
Contains the list of variable conditions. See below for more on how to configure a variable condition.
If:
Determines what happens when the variable conditions have been tested.
"No Conditions are Satisfied":
Execution will continue down the current branch if one or more variable conditions are satisfied; if no conditions are satisfied, execution will be affected as indicated by the Do property.
"Any Condition is Not Satisfied":
Execution will continue down the current branch only if all variable conditions are satisfied; if one or more conditions are not satisfied, execution will be affected as indicated by the Do property.
"Any Condition is Satisfied":
Execution will continue down the current branch if no variable conditions are satisfied; if one or more variable conditions are satisfied, execution will be affected as indicated by the Do property.
"All Conditions are Satisfied":
Execution will continue down the current branch if one or more variable conditions are not satisfied; if all variable conditions are satisfied, execution will be affected as indicated by the Do property.
Do:
Determines what happens when the variable conditions and the If property together indicate that execution should not continue down the current branch.
"As Specified Under Error Handling":
The Error Handling tab specifies in detail what to do.
"Skip Following Steps":
Execution down the current branch will stop.

Configuring a variable condition

A variable condition compares the value of a selected variable against another value. A variable condition is configured using the following properties:

Variable:
The variable (or variable attribute) whose value to test.
Operator:
The operator to use when comparing the value of the variable to the other value. See below for a description of the available operators.
Value:
The value to compare the variable value against. The value can be specified in several ways using a Value Selector.
Ignore Case:
If this option is selected, the comparison will be done in a case-insensitive way.
Always Satisfied if Variable is Empty
If this option is selected, the variable condition will be satisfied whenever the selected variable has no value, regardless of the outcome of the comparison.
Always Satisfied if Value is Empty
If this option is selected, the variable condition will be satisfied whenever the other value is empty, regardless of the outcome of the comparison. This option is useful if comparing the value of an extracted variable against a value in an input variable. If the input variable has no value for a specific attribute, the test of whether the extracted variable attribute value matches the attribute value in the input variable should usually be skipped. This is achieved by selecting this option.

The following operators are available in the Operator property:

OperatorMeaning
=Tests whether the two values are equal.
<>Tests whether the two values are not equal.
<Tests whether the first value is less than the second value.
<=Tests whether the first value is less than or equal to the second value.
>=Tests whether the first value is greater than or equal to the second value.
>Tests whether the first value is greater than the second value.
containsTests whether the first value contains one or more occurrences of the second value. The test is done on the text representation of the values. Note: If the first value is empty, the test is never satisfied. Also, if the first value is non-empty and the second value is empty, the test is always satisfied.
does not containTests whether the first value does contain any occurrences of the second value. The test is done on the text representation of the values. Note: If the first value is empty, the test is always satisfied. Also, if the first value is non-empty and the second value is empty, the test is never satisfied.
is contained inTests whether the first value occurs one or more times in the second value. The test is done on the text representation of the values. Note: If the second value is empty, the test is never satisfied. Also, if the second value is non-empty and the first value is empty, the test is always satisfied.
starts withTests whether the first value starts with the second value. The test is done on the text representation of the values. Note: If the first value is empty, the test is never satisfied. Also, if the first value is non-empty and the second value is empty, the test is always satisfied.
ends withTests whether the first value ends with the second value. The test is done on the text representation of the values. Note: If the first value is empty, the test is never satisfied. Also, if the first value is non-empty and the second value is empty, the test is always satisfied.

Note: The exact meaning of the operators '<>', '<', '<=', '>=', '>' depends on the type of the selected variable/attribute. For example, if the type is Short Text or Long Text, the comparison is done lexicographically, while it is done numerically if the type is Number or Integer.