Previous Topic: Add Repeat ConditionsNext Topic: Add REPEAT UNTIL Condition


Add WHILE Condition

The WHILE repeat condition repeats the action group as long as a condition is true. When you add the WHILE condition, set up the condition and then state the action(s) to be taken. The test for the condition takes place first. If the condition is not met, there are no iterations.

The WHILE statement can contain multiple TARGETING statements that target repeating group views.

The WHILE statement uses the following format:

WHILE condition-1
[TARGETING repeating-group-view-1 [FROM THE BEGINNING]
[UNTIL FULL]]
[AND TARGETING repeating-group-view-1 [FROM THE BEGINNING]
[UNTIL FULL]] . . .
action-statement-list

The following example of a WHILE statement sets a condition for a product code and USEs the action block check against order:

WHILE received product code IS EQUAL TO "WI"
USE check against order
WHICH IMPORTS: Entity View received product
WHICH EXPORTS: Entity View received product