In this article
This article explains how to set up a loop in your survey.
To create and set up a Loop item:
- In the Survey pane, add a Loop item to the appropriate location using the normal methods (go to Adding Items to a Survey for more information).
- Edit the loop object's name as required.
- Select how the answer list is to be sorted.
- Consider setting a field width to be used when exporting.
- Consider setting a progress bar weight.
- Consider adding a title for the loop.
- In the iteration items area, add the list of items you wish to ask the question(s) for.
- Click the green Inside button and create the questions you wish to ask of the respondent inside the loop, in the order you wish them to appear to the respondent.
The Loop item's question details page opens.
This answer list is the list of iteration values that you will add later in the procedure, such that the questions in the loop are asked for each iteration value.
During an export task this will limit the number of characters allowed in the database fields for responses to the loop question(s).
The progress bar weight is the estimated number of iterations through the loop that will be performed by a respondent when answering the loop question, that is, the number of iteration values that are "used". For example, if you are inviting the respondent to answer questions on five different products, then the respondent will go around the loop five times so you would input 5 in this field. If the number of loop iterations experienced by the respondent depends on the respondent's answers to earlier questions, then you will need to give a "best estimate". In the event a progress bar is used for the survey, this setting will then increment the progress bar an appropriate distance while the loop question is being answered. In the event you must give a "best estimate", the progress bar movement may be a little erratic during the loop question(s).
This could for example be a list of products where you wish to ask the same questions for each product. Note that you can use a reusable list here (go to Reusable Lists for more information), or paste the list into the area (go to Pasting Lists for more information).
You can use piping to include the relevant loop iteration value in the text of the question (go to Text Substitution or Response Piping for more information). For example Why did you choose ^f('l1')^?