Loop and Merge: EVEN randomization | XM Community
Skip to main content
Solved

Loop and Merge: EVEN randomization

  • February 20, 2019
  • 6 replies
  • 480 views

Rah
Forum|alt.badge.img+2
Hi, I'm using loop and merge over 500 text-blocks (500 paragraphs). Each subject should evaluate a subset with randomly selected 50 text-blocks. Is there any way to make sure that we have an even random allocation, such that each text-block is displayed to only 10 subjects (very much similar to even randomizing function in the survey flow but for loop and merge)? So far I´ve found this solution . But given the number of my text-blocks it's inefficient, I was wondering if it is the only solution! Best, Rah

Best answer by TomG

Just add a lot of padding to the beginning of the hidden question's text: ``` <div style="padding-top:1500px"></div> ```

6 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • February 20, 2019
No, the only solution is to loop based on a question that uses Advanced Randomization as described in the post you linked to. I don't know why you say it is inefficient. It isn't any more effort than setting up a regular loop & merge.

Rah
Forum|alt.badge.img+2
  • Author
  • February 20, 2019
Most probably I have not understood the solution! :/ How can I make a question with 500 answer options by "setting up a regular loop & merge"? Would you please elaborate on that or give me a link to where I can learn more about it?

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • February 20, 2019
> @Rah said: > Most probably I have not understood the solution! :/ > How can I make a question with 500 answer options by "setting up a regular loop & merge"? Would you please elaborate on that or give me a link to where I can learn more about it? Before your Loop & Merge block, create a multiple choice question with your 500 text blocks as choices. Apply Advanced Randomization to randomly display 50 of the 500 text blocks evenly presented. Hide the question with JavaScript. Set your Loop & Merge to be based on the DISPLAYED choices in hidden question you just created. Do NOT check randomize.

Rah
Forum|alt.badge.img+2
  • Author
  • February 20, 2019
Great. I did it and it works. The only problem is that even though I used the following code to hide the question, the question is displayed very briefly, like a flash. I found a similar question but didn´t understand what to do with the "padding" in the HTML code. Qualtrics.SurveyEngine.addOnload(function() { jQuery("#"+this.questionId).hide(); jQuery("#Buttons").hide(); }); Qualtrics.SurveyEngine.addOnReady(function() { jQuery('#NextButton').click(); });

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • February 20, 2019
Just add a lot of padding to the beginning of the hidden question's text: ``` <div style="padding-top:1500px"></div> ```

  • May 11, 2021

Hi TomG ,
I have the same issue, however, I have 1045 loops. The maximum number of answer possibilities is 1000, any ideas on how to solve this? Or is there another way to make even randomization?
image.png