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

  1. 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

  1. Open each dialog for editing and insert each repeated dialog (except for the first) into the dialog preceding it. (See Insert Dialogs Into Dialogs.)
  2. Select a repeated dialog style for each repeated dialog. (See Choose a Presentation Style for the Repeated Dialog or Display a Child Dialog Directly on the Parent Dialog.)

Repeats can not be nested more than four levels deep.