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.

## 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.

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.

#### π‘ 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.

### 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.

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`;

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.

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`.

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.

## 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.

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.