Logic
The Logic category allows constructs like conditional execution and loops inside Script Instructions. There are two types of logical constructs that can be used in Scripts.
Conditional Statement: If (...) {} else {}
While Loop: While () {...}
If (...) {} else {} : This construct executes a set of Instructions if the specified condition is met, and a different set of Instructions otherwise.
To use the
construct in a Script:Select the
from the dropdown list.An
construct is introduced into the Script.Enter a JavaScript expression that evaluates the required condition in the TRUE or FALSE.
field. The expression must evaluate to a BooleanClick TRUE.
to add the set of Script instructions to be executed if the condition evaluates toSelect any instruction that needs to be executed if the condition evaluates to TRUE. You could also introduce a Block Structure to encompass a set of Instructions.
Click the FALSE.
Instruction to add the Script Instructions to be evaluated if the condition evaluates toSelect any instruction that needs to be executed if the condition evaluates to FALSE. You could also introduce a Block Structure to encompass a set of Instructions.
An
construct is added to the Script.![]() |
While () {...} : This construct defines a While Loop.
It repeats the execution of a set of Instructions until the defined condition evaluates to FALSE. Before each Iteration, the condition is evaluated. If the condition evaluates to TRUE, the Block of Instructions is executed one more time. If the condition evaluates to FALSE, the execution stops.
To construct a Script Instruction using
Select
from the dropdown list.A TRUE or FALSE.
construct is introduced into the Script. Enter a JavaScript expression that evaluates the required condition in the field. The expression must evaluate to a BooleanClick TRUE.
to add the set of Script instructions to be executed if the condition evaluates toSelect any instruction that needs to be executed if the condition evaluates to TRUE. You could also introduce a Block Structure to encompass a set of Instructions.
A
construct is added to the Script.![]() |