How to: keep the same randomization order for several questions
A common requested scripting technique is to display a set of answers on screen in some randomized order. It could be there’re several questions with the same set of answers, where you would want to display that set of answers in a randomized order, yet in the same randomized order in each question.
This HowTo will show how this can handled.
1. Step 1: Create a Dummy Open Ended Question:
2. Step 2: Determine the randomized order
3. Step 3: Add the randomization code to all questions
Step 1: Create a Dummy Open Ended Question
Add an open ended question to the script, and set it to be hidden from surveyor.
The purposes of this question would be to save a string of the answers set indexes in the chosen randomized order:
Step 2: Determine the randomized order
Add the following code to the first question’s (out of the questions to display…) start script:
// create array of all answers indexes in a randomized order
// set the string of the indexes randomized order in the dummy question
Step 3: Add the randomization code to all questions
In all displayed questions’ start script, add this code:
Visit us at: