How to randomly allocate questions conditional on a prior filter question? | XM Community
Skip to main content
Solved

How to randomly allocate questions conditional on a prior filter question?

  • November 2, 2021
  • 2 replies
  • 19 views

Hi there, I hope one of you guys can help me: I am trying to figure out how to assign some random questions to respondents depending on a previous filter condition.
Let me explain: 
Context:

  • Q1 = filter question: select all that apply out of a set of 6 phases.

  • For each selected answer in Q1 there are 4 questions (Q2, Q3, Q4, Q5)

I would like to implement the following rules:
  • Q2 and Q5: show to all respondents who have chosen the respective phase in Q1.

  • Q3 and Q4: show to all respondents who have chosen the respective phase in Q1, unless…

  • They chose more than 2 phases in Q1, then they should receive only 2 randomized allocated Q3 and Q4 questions.

The idea behind it is that I would like to reduce the effort on the respondents who chose e.g., all 6 phases.
The first rule is easy but I am struggling to implement the second rule – does anyone know a solution?
Thanks for your help! 

Best answer by MSobotta

Loop and merge with display logic for those questions could make this happen. Is this enough to get you going?
Are Q2 through Q5 different for each selection in Q1?
If so my above solution will not work. It makes it a little work, but the randomization should be easier.

2 replies

MSobotta
Level 4 ●●●●
Forum|alt.badge.img+25
  • Level 4 ●●●●
  • Answer
  • November 4, 2021

Loop and merge with display logic for those questions could make this happen. Is this enough to get you going?
Are Q2 through Q5 different for each selection in Q1?
If so my above solution will not work. It makes it a little work, but the randomization should be easier.


MSobotta
Level 4 ●●●●
Forum|alt.badge.img+25
  • Level 4 ●●●●
  • November 4, 2021

If they are the same, you can use JS to pull loop number on a random loop and merge and display logic to hide your two middle questions.
If they are different questions per phase, it makes it a little easier as you don't need js. You just use a randomizer, counter embedded data and if statements.