In this article
Note: This functionality is only available for the Optimized Database format, and is not available for Info and Open question types.
If the Optimized database format has been selected for the Survey (go to Optimized Database Format for more information), then you can link a loop to the question and use the loop to provide the list of answers presented to the respondent. This reduces the size of the resulting database when the answer list is long, and also keeps the answer list "outside" the question, thereby allowing you to update the answer list without having to regenerate the database. You can also add other answers to the list in the normal manner in addition to the loop. Any settings applied to the answers, for example Randomization, will be applied to all the answers equally, irrespective of where they come from.
Note: Loop reference lists cannot be used in Open text lists, Numeric lists, Ranking questions, or Multis with Capture Order set.
Note: Loop reference variables are not supported in callblocks.
To add a loop, proceed as follows:
- If the required Loop object does not yet exist, create it and add the desired answers (go to About Loops for more information).
- Create the question to which you wish to add the loop.
- In the Answer tab for this question, click Add Loop Reference - .
- Click the down-arrow beside the answer field to open the drop-down list of the loops available, and select the desired loop from the list - .
- Add any other required answers in the normal manner.
- Save the changes.
Figure 1 - Adding a loop reference to a question's answer list
A row is added to the answer list, including a drop-down list of the available loops.
Figure 2 - Selecting the desired loop from the list of those available
Note: The list will only include loops that are at the same level in the Survey as the question to which you are linking the loop. I.e. You cannot link to a "loop within a loop".
Important
A question can link to at most one loop. An error message will be displayed when you launch the survey if you attempt to link to more than one loop.
Important
For a question that includes a loop reference, any non-loop reference answers must be given codes manually (go to Utilizing Answer Codes for more information). These answers cannot be allocated codes automatically as the loop reference will very likely cause duplicate codes to be generated.