Test box options

The first option in the IF action tab is the Test panel. This contains five options that allow you to decide whether you want the group of actions in the If action to occur if the condition is true or false.

To play the group of actions if the answer is TRUE:

  1. Select the Perform action if condition is TRUE option in the Test panel if you want to compare a variable with text, a number or another opus variable.

Note:
This will provide the options described in the If action tab – see If action for more information.

  1. Select the If the variable is set to TRUE option in the Test panel if you want to check when the variable you enter contains the word TRUE or contains the number 1 (in programming, 1 means true, while 0 means false).

Note:
This will disable (grey-out) the Comparison and Compare with options in the If action tab. Only the Name of variable to compare option is available – see If action for more information.

  1. Select the Use advanced condition option if you want to write an OpusScript statement. This statement must result in an answer of TRUE or the number 1 to run the group of actions for this If action.

Note:
This options in the If action tab will be replaced with a new Enter advanced condition box – see the Use advanced condition option below for more information.

To play the group of actions if the answer is FALSE:

  1. Select the Perform action if condition is FALSE option in the Test panel if you want to compare a variable with text, a number or another opus variable.

Note:
This will provide the options described in the If action tab – see If action for more information.

  1. Select the If the variable is set to FALSE option in the Test panel if you want to check when the variable you enter contains the word FALSE or contains the number 0 (in programming, 1 means true, while 0 means false).

Note:
This will disable (grey-out) the Comparison and Compare with options in the If action tab. Only the Name of variable to compare option is available – see If action for more information.

Use Advanced Condition option:

The Use advanced condition option in the Test panel replaces the options in the If action tab with a new Condition panel. This allows you to type in any valid OpusScript statement in the box provided. Alternatively, you could call a function in a Script Object on the current page.

The script must produce a TRUE or FALSE answer; for example, you could use an OpusScript statement to arrive at a true or false answer. Alternatively, you could call a function in a Script Object on the current page that runs a number of lines of code that then returns a true or false answer.

Note:
The group of actions underneath the If action will only run if the returned value is TRUE. If you want to run a group of actions when the return value is FALSE, add an Else action with its own group of actions to the If action.

Related Topics:

the IF action

The Else action