This translation is older than the original page and might be outdated. See what has changed.
Translations of this page:

Random Selection for Questionnaires

In a survey project you can create several questionnaires (Assemble Questionnaire) → Create new Questionnaire or Manage Questionnaires). If the participant opens the link to to questionnaire, they can be randomly assigned to one of the questionnaires.

Note: For experiments it is usually much easier (!) to create only one questionnaire and vary the stimulus with a small PHP code (Randomization).


First you create an additional questionnaire under Assemble QuestionnaireCreate new Questionnaire, that takes care of the random assignment. The questionnaire identifier can be chosen freely, for the following description we use the ID “random”.

Define this questionnaire as the default questionnaire under Assemble QuestionnaireManage Questionnaires.

Questionnaires for random selection

To ensure an equal distribution of the participants on the questionnaires, you need a question of the type Random generator. You can create this question in any category – for the further description it is assumed that this question has the ID “RF01”.

Create random generator

Enter the IDs of the questionnaires (see above) you want to choose between as codes in the random generator and save the question (Save question).

Leave the default setting “equally distributes” selected for the type of drawing. The option “Equally distributed in finished questionnaires” will not work because the random distribution questionnaire will never be finished.

Random generator for the selection of the questionnaire

Open the questionnaire that you have created for random distribution under Assemble Questionnaire for editing.

  1. Drag the random generator (RF01) to the first (and only) page of the questionnaire, and
  2. place the following PHP code below it.
$qnr = value('RF01', 'label');

The function value() retrieves the ID of the randomly drawn questionnaire from the random generator. The function goToQuestionnaire() jumps directly to the questionnaire with the corresponding ID.

Questionnaire to randomly select a questionnaire

You have chosen the questionnaire “random” under Assemble QuestionnaireAdminister Questionnaires as the default questionnaire for the survey project. The participants can call URL to the Questionnaire without further parameters (q=…). They will then first be taken to the “random” questionnaire and from there randomly distributed to one of the other two questionnaires.

en/create/random_questionnaire.txt · Last modified: 25.01.2020 16:46 by admin
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki