Nest REPEAT Instructions Using a Computation Variable
You can use a Computation variable to nest REPEAT instructions. This allows you to use other instructions or expressions to create more complex repeated dialogs.
For example, perhaps you want to use a computation to generate a list of different departments within a company. Then you can list the names of employees within each department.
To nest REPEAT instructions in a Computation variable
- Create a Computation variable and enter the script containing the nested repeats in the Script field. (See Customize a Computation Variable.) An example of a possible script would be:
""
REPEAT Department Information
RESULT + Department Name + " " + "Department" + "
"
REPEAT Employee Information
RESULT + " " + FORMAT( COUNTER , "9" ) + "." + " " + Employee Name + "
"
END REPEAT
END REPEAT
Repeats can not be nested more than four levels deep.