Test Value

This action tests a Boolean value to determine whether execution should continue down the current branch or if something else should be done. The action is among other things useful if the value of a global variable should be checked. For example, the action can be used to check if a counter has exceeded a given value.

Properties

The Test Value action is configured using the following properties:

Condition

Contains the condition. The condition must evaluate to either true or false. Any other value will produce an error when the action is executed. The default way of specifying the condition is by entering an expression. However, one the other options of the Value Selector can also be used.

If

Specifies the exact condition to test for, and thus enables inversion of the stated condition. The default is to test if the "Condition is Not Satisfied". If this is selected and the condition evaluates to false, execution will be affected as indicated by the Do property; however if the condition evaluates to true, execution will continue down the current branch. It is possible instead to test if the "Condition is Satisfied", which reverses the outcome.

Do

Determines what happens when the condition 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.

Example

In the following examples, the condition is specified using an expression. This is the default way of specifying the condition.

Test if a text has a specific length:

ScratchPad.shortText1.length() == 28 

Test multiple values at once:

PersonInput.isMale && PersonInput.isMarried