Applying Least Fill assignments | XM Community
Skip to main content
Has anybody ever applied a least fill process in their Qualtrics survey? Is this even possible? If so, please help with how you did it.



Scenario is this. We have a question asking which categories (grocery) the respondent has shopped. From this we want to assign each person a specific category to ask them questions about. I know how to randomly assign, but was wondering if it was possible to make it so it wasn't random, but pick the category that the least amount of 'assignments' at the time.



Thanks!
I've done it by setting up a quota for each category then piping all the quota counts into a web service that selects the least filled. You could achieve the same result with a JavaScript, but I prefer the web service approach.



Maybe there is a better way, but this has worked for me.
Interesting, thanks for your reply. Guessing this might be too complex for my skill set. But out of curiosity, if it isn't too much trouble, is there a particular resource you used to help you set up that web service or do you have any tips?
A web service script is a just a web based script called from the Survey Flow that can accept inputs (get or post), perform a process, and return output (if any) in json or xml format that can be used to populate embedded variables in Qualtrics. I use php, but you could use any web scripting language. In php the output part is easy: `echo(json_encode(output));` where output is an associative array of your output variables.
Here's a non-scripting solution that MIGHT work (I haven't tried it):

1. Carryover your selected answers to another MC question.

2. On your new CO question, set up Advanced Randomization to randomly select 1 choice from all the choices and check Evenly Present.

3. Hide the CO question with JavaScript (hopefully you can put it on the same page as another question, otherwise your JS has to click the Next button too). Also, make sure it isn't forced response.

4. Base your subsequent logic and piping based on the displayed option in your hidden CO question.



I think "Evenly Present" will pick the least filled of the available choices.
That makes sense to me. I will give it a shot. Thanks again!

Leave a Reply