This tutorial demonstrates how you can use a Branch Node to branch participants based on their responses in a questionnaire. In this example, we want to branch participants based on the age they enter. If participants enter a number below 18, they will be branched to a Reject Node. If participants enter a number higher than 18, they can continue with the rest of the experiment.
In the questionnaire, a Text Entry component is used to collect the response. We use the Save to Store toggle to save the Value to a field in the Store called ‘age’. You can find some more information about saving to the Store in our Store guide.
Then, in the Branch Node in the experiment we create two groups. One group named ‘under18’ and a second named ‘over18’. For both groups, the Property is ‘age’, to match the name of the field in the Store in the questionnaire. Then, in the under18 group, we want to branch any participants where the response is less than the Value of 18 to the Reject Node; in the over18 group, we branch participants where the response is equal to or greater than the Value of 18 to the rest of the experiment. We can test out our branching by previewing the experiment multiple times to test the different branching options.