Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Adaption to the new version of the Multi-Select Quota

Hi Zachary,
I have a similar problem. Respondents can select up to 4 items, of which 2 have to be selected with least fill (percentage). I've downloaded the Multi-Select Quota from the library, but it seems that there were some modifications so that the code above doesn't work anymore. Is there a possibility to adapt the code above to the new version? I tried to use the new version, but only the first quota fills.
related to an answer for: Show Question based on Least Fill Quota
asked Mar 3, 2022 by ingo Bronze (810 points)
The syntax of the settings have changed, but the same functionality should still be possible.  Making each cell qualify based on an item being selected from a previous question can be done by making "%quotaCells" look something like this:

my %quotaCells = (
    1 => {
        limit => 99999,
        qualify => sub { return GETVALUE('Q1_1'); }
    },
    2 => {
        limit => 99999,
        qualify => sub { return GETVALUE('Q1_2'); }
    },
    3 => {
        limit => 99999,
        qualify => sub { return GETVALUE('Q1_3'); }
    }
);


"$membershipOrder" can be set to 1 for least fill (percentages), but that is identical to having it set to 2 if all the quota cells have the same limit.

It sounds like you'd want "$numberOfQuotas" and "$numberOfChoices" to be set to 2 so each respondent will qualify for up to two quota cells.
Hi Zachary, thank you for your quick response. I've set it up like suggested and the helpers are set, but only the first quota fills. What could be the problem with the second quota?
And there is another problem: The respondents can check up to 4 items, but it is also allowed that they check 0 items. Do we need a 5th cell in every quota which is set to "return 1"?
Hi Zachary, I've got it to work that the second quota is filled, too. And with entering a 5th quota cell, it works when the respondent selects at least one answer. But when the respondent selects no answer, it returns quotafull for the second quota.
Addionally, even when I set the $membershipOrder to 1, there is no least fill functionality, all respondents are set sequentially (1 in quota 1 and 2 in quota 2) even if they have selected items 3 and 4, too. Any suggestions about this?
"Multi-Select Quota" normally selects up to "$numberOfChoices" cells, but will select fewer if not enough cells qualify for the current respondent.  What do you want to happen if a respondent selects 0 or 1 items in the select question?
There are two possibilities: Set the quotas to 5 (for "not selected") or skip them completely.
Do you have any idea regarding the least fill problem?
The latter sounds like the easier option.  We should just have to set both quota questions to only have the four normal quota cells.  If a respondent checks only one box, the first quota should have a value while the second should have -1 (and its helper should be blank).  If they check no boxes, both quotas should have -1.  Then we can use skips or a constructed list or something to do whatever work we need to do with the selected items.

I'm not sure about the least fill behavior you describe.  It is worth noting that the least fill algorithm only takes completed respondents into consideration.  If your testing leaves the respondents incomplete or disqualified, the cells they were put into won't factor into the next respondent.  But the least fill algorithm is meant to randomize on ties, so the first respondent should have their cells chosen randomly if they check all four boxes.  Do you perhaps have older respondent test data in your survey that could be forcing new test respondents to get the first two cells?
I think I've solved the problem. There is a little mistake in your syntax. In the Parameters section it says 0=Sequentially, 1=Least fill (percentages) and so on. In the Run section it says 1=Sequentially, 2=Least fill (percentages) and so on. So I only have to change the number in the Parameters section.
Would there be a difference to use Least fill (percentages) or Least fill (counts) when many respondents take part at the same time?
Whoops, my bad.  Thanks for pointing that out - I'll be sure to fix it in the next update.

None of the membership order methods should be affected by concurrent respondents.  The only difference between the two least fill methods is when you have quota cells with different limits.  For example, set one cell to a limit of 10 and another to a limit of 100.  Least fill (percentages) will send more respondents into the second cell early on to try to keep their completion percentages equal.  Least fill (counts) will send respondents to both evenly until the first cell is full, then send all the rest to the second cell.  So long as both of your cells are set to 99999, they will work the same.
No problem and thank you again for your great work!

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.
...