Is it possible to randomize least fill a particular survey loop? | XM Community

Is it possible to randomize least fill a particular survey loop?


Badge +1

I'm looking to pipe open-ended responses from a question earlier in the survey into a 12-question loop specifically about that thing. Ideally, we'd like to use the categories selected in another question (that are tied to each open-end) to randomize least fill into this particular loop. What logic should I use to make that happen?
This is a simplified version, but essentially, it's:
Q1 Open-end form field (multiple)
Q2 Matrix to categorize each open-ended form field response
Q3-15 Loop with form field responses piped in, randomize least fill based on categories in Q2


13 replies

Userlevel 5
Badge +12

Hi NatalieO
Please let me know if I'm able to understand your question correctly.
a) Do you want to pipe text answers from Q1 into your loop and merge block? and randomize least fill based on categories in Q2?
b) By categorizing in Q2 , its means categorizing by different scale points, right?

Badge +1

Hi omkarkewat
Yes, both of those things are correct. That's exactly what I'm looking to do!

Badge +1

omkarkewat Do you have any ideas?

Userlevel 5
Badge +12

Hi NatalieO ,
I'm scratching my brain really hard for it since yesterday. If I found any solution will definitely get back to you.

Badge +1

omkarkewat thanks, I appreciate your help! It seems like it should be possible, but I can't figure it out for the life of me.

Userlevel 7
Badge +27

NatalieO,
Here is the basic process:

  1. Create quotas for each category. The quotas will be based on embedded data flags for each category that you will set in step 2.

  2. Using the statements and answers from your matrix and the quota counts from step 1, use a web service or JavaScript to do two things: (1) randomly select the least filled categories (as many as you want to display) by setting their embedded data flag to 1, and (2) assign a second embedded data field for each selected category that contains their associated open-end from Q1.

  3. Add a MC question before your loop, and hide it with JS. The choices will be your categories. Add display logic to each choice (display if its flag is 1 in step 2).

  4. Base your loop off the displayed choices in the step 3 MC question. Field 2 will be the category open end embedded data fields from step 2.

Badge +1

Hi TomG
Thanks for your response. I'm not familiar with JavaScript, so that makes your process a little difficult from my point of view, but I really appreciate the solution idea.
Essentially, rather than looping based on a question, we need to loop based on a quota that comes from a question. Then, with that quota, we need to loop based on the ‘least fill quota’ (aka randomize based on the quotas that have the fewest responses in the loop up to that point). Is there any way to do that without using JS or another web service?

Userlevel 7
Badge +27

https://community.qualtrics.com/XMcommunity/discussion/comment/54389#Comment_54389No, not really. Theoretically, I guess it would be possible with many survey flow branches, but that would quickly become untenable.

Badge +1

TomG
If I use these survey branches, would it work? And if so, what would the next step be with the hidden MC question? I'm not sure I understand how the piping from that question into the loop would work.
Screen Shot 2023-01-24 at 11.48.45 AM.png

Userlevel 7
Badge +27

It wouldn’t work if any of the quota counts are equal…that’s where randomization would come in.

Badge +1

Ah, I see. And randomization would only work with the JavaScript?

Userlevel 7
Badge +27

You could add a lot more branches with randomizers, but as I said, that would quickly become untenable.

Badge +1

Got it, thank you!

Leave a Reply