Display random number of questions

Suppose you want to display only two of the following four questions to each survey participant, without it being clear in advance which two questions will be presented to a participant. This requires the following elements to be included in a survey:

A section with a value assignment which contains a variable used to calculate the total number of questions displayed to a participant, e.g. the variable Total with the data type Integer number. At the box Is equal to the following term: specify the value 0 and at the Execute setting (below) select the option Every time the participant passes this point. This section should be inserted at the top of the survey.

Four sections (e.g. Section 1 to Section 4) containing one question for each section which will either be displayed to a participant or not. In each section, a value assignment with the variable Total (Integer number) you defined should be included above each survey question. At the box Is equal to the following term: specify in this case the function Total + 1. This is because the counter starts at the value 0 for each participant. Each time a participant has answered a question, the counter should be incremented by 1. The maximum value at the counter should be 2, which corresponds to the number of questions to be presented to a participant. The option Every time the participant passes this point should also be selected in the Execute setting.

A filter should then be configured for the corresponding four sections to ensure that only two out of four questions (is: < 3) are shown to a participant. When you position the mouse pointer on a section element in the survey, you can specify a filter to the right. You do so by clicking on the Add filter button. In the window that then appears, you can record the following data:

  • Show this element
  • IF – Custom variable – Total < 3

These four sections must all be randomized so that each survey participant will be shown a random set of two questions. The remaining sections in the survey (e.g. the first section with a value assignment only and any sections AFTER the above-mentioned four sections) can be excluded from randomization. If you check the Section order setting (under Interview settings), the order of all sections in your survey will be randomized. In the Excluded: field, you can then indicate the sections to be excluded from randomization.

Note: For this functionality to work properly, the setting Participants can go back and change their responses (Back button) should not be checked.

Updated on May 31, 2023
Was this article helpful?

Related Articles

Need Support?
Please login to your Survalyzer account and use the "Create Support Request" form.
Login to Survalyzer