Looping - How to?

What is looping?

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 use looping?

For example:

1. Screenshot

Survey Software Help Image

2. Screenshot

Survey Software Help Image
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.

Important:

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 Add / Update Logic link on Q1.

3. Screenshot

Survey Software Help Image

Step II: On the popup screen select the Branching / Skip Logic option.

4. Screenshot

Survey Software Help Image

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. Enable Looping and click the Update Branching Information button after you are done.

5. Screenshot

Survey Software Help Image

Step IV: Now to complete the set up add a page break on Q2 to denote end of loop.

6. Screenshot

Survey Software Help Image

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.

See example:

Start your Free Trial