Video tutorial about branch behaviors.
Using logic4 Min.5 Min.

How to repeat follow-up for a selected number of times

Learn how to repeat follow-up questions for the number of times that your respondent has selected.


When to use

In some situations you want to repeat the same question(s) a couple of times. In Tripetto it is possible to automatically iterate through a set of follow-up questions for a number of times that your respondent has entered.

A simple example is when you want to ask for the names and dates of birth of someones children. You can ask how many children your respondent has and then ask the follow-up questions (name and date of birth) for the amount of children the respondent has.

Screenshot of a form in Tripetto
Demonstration of iterating questions for the selected number of times.

How to use

The idea is to first let the respondent enter the amount and then repeat the follow-up question(s) for the entered number of times.

Add number block

We start with adding a number block and entering the question we want to ask.

We advise to enable the Limits feature in the number block and set the maximum number of times you want to repeat the branch. This is important to remember when we create the branch conditions.

And in our example we have set an alias KIDS to the number block.

Screenshot of the form builder in Tripetto
Settings of the number block. In this example we have a maximum of 4.

Use other question types

Instead of the number question type you can also use other question types to let your respondents enter the amount, for example a dropdown, multiple choice buttons or radio buttons.

We will explain how to set that up at the end of this article (click here).

Setup branch

Now, instead of creating the same follow-up questions multiple times, we will create a branch that we will be repeating. To do so, we add an empty branch by clicking the diamond at the right side of the section.

In the newly created branch, click the branch bubble at the top of it and then select the branch behavior For each condition match (iteration). This will make your branch repeatable for each condition that gets matched.

Screenshot of the form builder in Tripetto
Add an empty branch and set the branch behavior to For each condition match (iteration).

Next step is to add the branch conditions. To do so, we click the button at the bottom of the branchSelect our KIDS questionSelect the condition Number is higher than.

In our example we add the following branch conditions (corresponding the maximum amount we entered in the number block):

  • KIDS is higher than 0;
  • KIDS is higher than 1;
  • KIDS is higher than 2;
  • KIDS is higher than 3;
Screenshot of the form builder in Tripetto
Add the Higher than branch conditions.
Screenshot of the form builder in Tripetto
The result of the branch.

Add follow-up

Now you can add the desired follow-up questions underneath the branch. You can add as many blocks as you'd like and they all will be repeated for the selected number of times.

Add branch number

Inside the iterating branch you might want to add an ascending counter to show the branch iteration number that your respondent is in. To do that you can add a calculator block and use the constant Branch number. And by using piping logic you can then show that branch number in a question that you show in your iteration.

Screenshot of the form builder in Tripetto
The end result of the branch with the follow-up.

More logic possibilities

The logic described in this article is an example of what Tripetto can do to make your forms smart. Discover the power of branches for your logic to see all logic capabilities.


More video tutorials

You can have a look at all our help articles for more in-depth (video) tutorials to get the most out of Tripetto. Or have a look at our YouTube channel for all videos.


Use other question types

In the article above we used the question type 'Number' to let the respondents enter the amount, but you can also use other question types to let your respondents enter that amount, for example a dropdown, multiple choice buttons or radio buttons.

Add choices and scores

To do so, add the desired amounts as choices in your 'Amount' question and enable the Score feature. Now you can add a score for each choice, corresponding the amount that each choice represents.

Use scores in branches

Now you can use those scores to setup the branch conditions that we described in the above article.

Screenshot of the form builder in Tripetto
The choices and scores of a dropdown question.
In this article

    Help us improve