Display a random set of questions on a 2nd block while excluding a question previously displayed | XM Community
Skip to main content

Hello. I understand that I can use the randomizer If I have a set of questions {Q1,Q2,Q3,Q4,Q5} in a block and wish to display a subset of these in random order e.g. {Q2,Q5}. Is it possible to display a random question on page 1 then have page 2 be a random subset of questions that excludes the question previously displayed on page 1?
Here are some example cases:

  • Page 1 displays Q1 and Page 2 displays {Q2,Q3}

  • Page 1 displays Q3 and Page 2 displays {Q4,Q2}

  • Page 1 displays Q3 and Page 2 displays {Q1,Q2}

So basically page 2 will not repeat the question already presented on page 1.

Oneof the solution will be to create duplicate block i.e. OriginalBlock(OB) and DuplicateBlock(DB).
In the survey flow have OB as the first block .i.e before DB.
In OB, add question randomization, as present only 1 question of total questions.
Add display logic on each question of DB, as display if respective question in original block was not displayed. Eg: on q1 of DB the logic will be display if q1_OB is not Displayed. In DB, go to advanced question randmization and add all questions to "Random subset" and put 2 as number of question that should be displayed. In the same column scroll below to "questions per page" and put their 2.
Now, obvioulsly this method will make the data position inconsitent in the data and analysis tab, as their are two different questions for one question. So, you can create an embeddded data for each question and pipe the respective data to it.
OR
We can use custom code to show fake page breaks.


Leave a Reply