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.

πŸ“Œ Also see: More logic possibilities

The logic described in this article is just one example of what Tripetto can do to make your forms smart. Have a look at this article to see all logic capabilities:


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.

πŸ’‘ Tip: 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).

Add 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 branch setup with branch conditions.

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.

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

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.

Screenshot of the form builder in Tripetto
The calculator block inside the branch with a Branch number constant.
The calculator block now holds the number of the iteration that the respondent is in. By using piping logic you can then show that branch number in a question that you show in your iteration.

πŸ“Œ Also see: Piping logic

Please have a look at this article for more information about recalling values with piping logic:

Screenshot of the form builder in Tripetto
Show the branch number in a question in your iteration.

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 one of the mentioned questions types to your form and add the desired amounts as choices in that question. Next, enable the Score feature for this question block. Now you can add a score for each choice, corresponding the amount that each choice represents.

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

πŸ“Œ Also see: Scores

Please have a look at this article for more information about adding scores to your question blocks:

Use scores in branches

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


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.

In this article

    Help us improve