Looping - How to?

When the same question or set of questions is asked multiple times for different options it is termed as looping. Looping allows you to dynamically "loop" through a set of questions based on responses to a multiple choice question.

Why must you use looping?

For example:

Survey Software Help Image

Survey Software Help Image

Note: In this case you would like to ask Q2 for all the options selected in Q1. Also, you would like XXXXXXXXXX replaced by the appropriate restaurant name (i.e. Pizza Hut or Dominos etc).
One way to set this up would be to create a separate question Q2-a, Q2-b, Q2-c, etc. for each selection in Q1. However, since the question Q2 is the same for each selection in Q1, we don't need to set up different questions, we can simply use Q2 with looping.


Looping is available only for Multiple Choice Multiple Select (Check Box) type questions.
Enabling Looping will ALWAYS PRODUCE MULTIPLE ROWS for the same response ID - One row for each loop. If you are planning on exporting the data to other statistical packages, please make sure that the other packages are able to handle the data in this format. SPSS does NOT handle the data with multiple rows for each loop.
If you use looping, please check how responses are saved. If there are issues with multiple rows of data for the same response ID we strongly suggest you to not use looping and instead set up a different question for each selection option.

How to set up Looping?

Before you can set up looping first you need to set up questions Q1 and Q2. Since we want to replace the restaurant name in Q2, we can use ${piping_text} in place of XXXXXXXXXXX. Piping text will get automatically replaced with the appropriate restaurant name for each loop.

  • Step I: To set up the logic click on Logic icon on Q1.
  • Step II: On the popup screen select the Skip Logic option.
  • Step III: Select Q2 as the destination (Jump to) question for each answer option in Q1 and set up piping text for each selection option.
  • Check the box Multiple Branch (Looping) and click the Save Logic.
  • Survey Software Help Image
  • Step IV: Now to complete the set up add a page break on Q2 to denote end of loop.

Can I have more than 1 question in a loop?

Yes. You can have multiple questions in a loop as follow up questions. Set up is similar except for setting up the Page Break. If there are multiple questions then we need to set up a Page Break on the last question in the loop. Page Break is used to denote the end of loop.

How can I view the Reports for the looped data?

You can setup Grouping for each loop and run the Reports to view the Results.

How many criterias can I add in a logic?

You can add upto 5 criterias in a logic.

Note: Back Button is not supported in Looping.

This feature/tools described here are available with the following license(s) :

Corporate Edition and above

Was this article helpful?
Sorry about that
How can we improve it?