In this article
Defining a Loop in the Legacy Database Format
To define a loop in the Legacy database format:
- Create a Loop object in the Survey Tree in the normal manner.
- Double-click on the Loop object in the Survey Tree to open its Details page.
- Give the loop a unique ID within the survey (note that the text is not case-sensitive).
- Create a list of loop-iterations in the same way as you would create an answer list in a form (go to About Answers for more information) - .
- If required, apply masking such that the loop only operates under specified conditions (go to Masking for more information).
- Open the loop's Properties page and set the properties as required (go to Loop Properties for more information).
- Save the changes.
Figure 1 - Example of the Loop Details page in DHTML mode
You can now link the loop into another question such that the question is repeated for all the answers specified in the loop.
Defining a Loop in the Optimized Database Format
To define a loop in the Optimized database format:
- Create a Loop object in the Survey Tree in the normal manner.
- Double-click on the Loop object in the Survey Tree to open its Details page.
- Give the loop a unique ID within the survey (note that the text is not case-sensitive).
- Open the loop's Properties page and select the type of answers that you wish to use (go to Loop Properties for more information).
- If you select Normal answer list, create a list of loop-iterations in the same way as you would create an answer list in a question (go to About Answers for more information) - , then save the changes.
- If you select Table Lookup, then the Schema Name page opens - .
- Select the table you wish to use.
- If required, apply masking such that the loop only operates under specified conditions (go to Masking for more information).
- Save the changes.
Note: When the Optimized Database format is selected for the Survey, you can select between Normal answer list and Table Lookup (go to Hierarchy Lookup for more information).
Note: In the Optimized Database format, loop-reference answers (answers defined in a loop but used by another question) cannot be added to Hitlists, nor will it be possible to filter on these answers in Hitlists.
Figure 2 - Example of the Loop Details page in DHTML mode with Normal Answer List selected
Figure 3 - Example of the Loop Details page when Table Lookup is selected.
The Schema Name column lists all the available database schema. When you select the desired schema, a Table Selection field opens in the area to the right of the Schema Name column.
You can now link the loop into another question such that the question is repeated for all the answers specified in the loop.