FREE ACCOUNT
Home Features Looping logic

What is looping logic in surveys?

Looping logic allows you to dynamically iterate through a set of questions based on responses to a multiple-choice question. With looping enabled, you can ask the same question or set of questions multiple times for different options.

Looping skip logic branching is available only for multiple choice multiple select or checkbox type questions. You can also have more than one question in a loop as follow-up questions.

Add looping logic to surveys

When looping logic is set up for a question, a page break is automatically inserted. This page break is necessary for branching to function correctly. It denotes the end of the loop and cannot be removed. If there are multiple questions, then add a page break on the last question in the loop. You can pass the values to the follow-up question using piping text or custom variables.

To complete the proper logic flow, you should set up branching logic for each of the follow-up questions. They should point to the common question which all respondents should answer after going through the logic loop. You can also set the default branching of the question to any question, page, or terminate the survey. If the respondents do not select any option, then the survey will execute default branching. You can limit the number of answer options and branches by using branching randomizer .

To terminate the survey after the follow-up question, set the default branching of the follow-up question to the 'Terminate Survey' page.

Example of looping skip logic in a survey

Consider a restaurant evaluation survey that collects customer feedback for various brands. Market researchers can use the responses to do a comparative analysis of customers' experience of each brand. For such analysis, they must ask all the respondents the same set of questions.

Looping skip logic

Q1 has looping logic enabled with Q2 as a follow-up question of Q1. Based on the option selected by the respondents, the survey will jump to the relevant question. In the above example, Q2 will be displayed two times as two answer options are selected in Q1.

Looping survey logic Looping logic

Data analysis of a survey with looping logic

Enabling looping will produce multiple rows for the same response ID. The system will save one row for each loop. If you want to export the survey data to other statistical packages, please make sure that the other packages can handle the data in the same format. SPSS does not handle the data with multiple rows for each loop.

If you face any challenges doing data analysis with multiple rows of data for the same response ID, we suggest setting up a different question for each selected answer option.

Uses of looping logic in surveys

While you can use looping in any survey that needs respondents to answer the same set of question iteratively, some of the typical applications are as below:

Advantages of uses looping skip logic in surveys

How to set up looping logic in your surveys?

Learn how to set up and use this feature using our help file on looping logic and branching.

CREATE, SEND & ANALYZE YOUR ONLINE SURVEY COMPLETELY FREE

CREATE SURVEY NOW