Have an idea?

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

Trying to build a quota based on which iterations of loop question have been seen/answered

I have a loop question that, depending on an answer to a previous question, a respondent will either see 1 or 2 iterations of the loop.

The loop question itself has 24 items, and is a multiselect question.
The loop list has a total of 8 possible items, but a respondent will only ever see 1 or 2 iterations.

What I need to be able to do is track how many of those 8 items have been answered. So, for example, if a respondent saw 2 iterations in the loop (q1.1 and q1.8) I would know that item 1 and item 8 had each been seen/answered 1 time.

I need to be able to see/control how many times an Item has been seen/answered. In this case, each of the 8 items needs to be seen/answered 250 times each.

I was setting up a quota do do this, but I'm lost at how to check if a particular iteration of a loop question has been answered.
asked Jan 27, 2021 by Daniel F. Bronze (800 points)
I think this should be possible, but I'm not 100% sure I follow.  I think you may have used "item" to describe both the items being shown in the multiselect question as well as the items being looped over.  The variable stored in the database for a looped multiselect question would look something like "Q1_2.3," so I'm not sure whether you mean the Q1 list item or the loop list item when you write "Q1.1."

Is the goal that each item of the multiselect question's list should be selected 250 times across respondents?  If so, should it count once or twice towards that total if a single respondent looped twice and selected that item both times?
Looking back on my question, I wasn't very clear.

I have a loop question. That question is a multiselect and has 24 items.

The loop question list contains 8 brands. Respondents will see either one or two iterations of the loop. The brands are what I need to be able to see/control via a quota.  

My goal is to ask the loop question for all 8 brands, 250 per brand.  
So I need to track how many times a brand from the loop list was the one or two that the respondent saw the question in the loop for.

I hope that makes sense. It's been a crazy week so far.

Thank you much
I see.  That is possible with quota questions, but it does become trickier because respondents are able to potentially add to multiple quota groups, which is not possible with a single quota question.  We'd need to use two quota questions and some code to make them cooperate with each other.  I've written code like this before, but only in such a way that the two selected items would be done at random.  Would that work for you, or is there some criteria that defines which of the eight items a single respondent qualifies for?  Perhaps a constructed list?
There is a constructed list for the loop, so I will always know which brand they saw per iteration of the loop.

Depending on respondents answers to previous questions, the constructed list will either be empty (they didn't select any of the 8 brands we are asking the loop question for and skip the loop since the constructed list is empty) or have 1 or 2 items in it.

That list is then used for the loop question.
I assumed that respondents could qualify for 3+ items so you wanted to narrow those respondents down to just the 2 items that had the fewest completes.

But you already have narrowed the items to 1 or 2 per respondents?  So you want to loop over those 1 or 2 items, just skipping if the item has already hit 250 total respondents?
The constructed list for the loop is using ListMax(2) after it builds the initial list of which 8 brands the respondent will see in the loop. It prioritizes some brands depending on answers to previous questions.

Some respondents will not see the loop question if they don's choose any of the 8 brands we are tracking.

So a respondent could end up seeing 2 of the brands in the loop, which would count towards the target 250 answered loop questions for each brand.

Currently my client only wants respondents to see the loop question if the respondent has selected any of the 8 brands i am trying to track in a previous question.

Thank you for all your help.
If I understand correctly, I would think you could do this by adding eight quota questions to your survey.  Each one would have a single quota cell with a maximum of 250 that respondents qualify for if the Nth item is in the constructed list.  Then you could create a second constructed list that adds the items related to the quota questions that a respondent makes it into.  Does that make sense?
Hi, I have a similar issue. How would I check if the Nth item is in the constructed list?
I'm not sure your whole situation, but there's a Sawtooth Script function ListHasParentMember that returns whether or not a constructed list includes a given item of the predefined list.

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.