Randomizer | XM Community
Skip to main content

Randomizer

  • January 9, 2023
  • 1 reply
  • 18 views

Forum|alt.badge.img+1

I am developing a survey that includes 15 questions. Each question has two different types (A and B). When presenting questions to participants using the randomizer, A and B need to be randomly assigned. However, a participant may only get one type of questions (For example, 15 A-type questions). Is there a way to randomize A and B with a 50:50 ratio? Or is it possible to provide an A-type question at least 6 times or higher for a participant within one set of 15 questions?

1 reply

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • January 9, 2023

You could use JS to set embedded data fields for each question (q1 through q15) that would then be used in question display logic. Randomly assign to A or B, and keep count of how many are assigned to each. Once a count reaches 8 don't assign anymore to that letter.