Have an idea?

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

How to create counter variables for constructed list items for quota purpose?

I have a parent list with 32 items.  7 items will be applicable only to a subset of respondents. The other 7 different items to a different subset of respondents.   The rest of 18 items are applicable to all respondents. So each respondent has a total of 25 possible items to be selected.

Each respondent will only see a max of 13 items. I have created a constructed list that consists of randomly selected 13 items out of the 25.

How/What can I do to ensure that each item has at least of 100 completes? Perhaps the constructed list needs to be modified in some ways but I don't know how?

Please help. Thanks
asked Jul 31 by anonymous

2 Answers

0 votes
Try this example out to begin with ...

Parent list: call this ItemsList.
Subset variable: call this Group.

Group 1: Allocate items 1-7
Group 2: Allocate items 8-14
All respondents get access to 15-32

Pop this Perl Script into a constructed list (which uses ItemsList as the parent list). Call the constructed list ItemsConList.
Begin Unverified Perl 
  
 if(VALUE("Group")==1)
  {  
   ADD("ItemsList",1,7);
  }
 else
  {  
   ADD("ItemsList",8,14);
  }

 ADD("ItemsList",15,32);
 RANDOMIZE();
 LISTMAX(13);
 
End Unverified

This constructed list assumes the respondent is either in Group 1 or Group 2 and adds the applicable items to the constructed list. It then adds all remaining list items 15-32, randomises the list and trims it to 13 items.

You did not mention anything about all Group items needing to be included in the final list of 13 items. If that is the case, we will need to tweak this solution.

For you quotas, define all 32 items and use the following logic for each ...

Item 1: ListHasParentMember(ItemsConList,1)
Item 2: ListHasParentMember(ItemsConList,2)
...
...
Item 31: ListHasParentMember(ItemsConList,31)
Item 32: ListHasParentMember(ItemsConList,32)

Good luck.
answered Jul 31 by Paul Moon Platinum (82,475 points)
0 votes
Hi User,

As you mentioned you have created a list of 13 items that can come. At the same time, you want to ensure all item gets min 100 completes.

I would suggest you to create 32 quota with one item each and then create a list that will get you 13 items based on lowest read so that you don't get more completes and each item count goes in parallel and no item gets too much/too less completes and each brand will be considered equal.

In the constructed list, add the items based on subgroup condition and add only if the corresponding quota limit is open. If that's true, save the current quota count in a variable for each item. Then sort the counts in ascending order and you can then add only the 13 items with least count.
QuotaCellCompletes/IsQuotaCellOpen function of Sawtooth will help you in doing so.

Also in each quota, add a cell condition ListHasParentMember(conslist,1) and at the same time add a preskip condition on each quota not(ListHasParentMember(conslist,1)) so that you don't get terminate if that item does not exist in the constructed list. Change 1 with 2,3,..., Respective item number. Each quota will have max limit, say 999.

Hope this helps.

Regards,
Rahul Mittal
answered Jul 31 by Rahul Mittal Bronze (4,980 points)
edited Jul 31 by Rahul Mittal
Thank you Paul and Rahul. It is helpful.

No all group items need to be in the final list of 13.

Rahul, How do I save the quota count in a variable for each item? Do I add  not(ListHasParentMember(conslist,1)) in the Skip Logic tab of the Quota window? What should the Skip To be?
For adding variable:

Begin Unverified Perl
my $var1=99999;
if(VALUE("SubGroup")==1 && ISQUOTACELLOPEN("QuotaName1",1)){$var1=QUOTACELLCOMPLETES("QuotaName1",1);}
End Unverified


First add condition for the corresponding item (if any) and then other condition as added above.

Yes, preskip to be added is not(ListHasParentMember(conslist,1))
Change 1 with 2,3,..., Respective item/quota number. This quota is added so that respondent don't get disqualified if item 1 is not there in the constructed list.
Thanks again Rahul for your quick response.

Is the Perl script to be added in the Constructed List Instructions?

In the  Skip Logic tab of the Quota window,  Skip To must be specified. My question is what should I select for Skip To?
Yes, perl to be added in constructed list. And skip to "next question" - 1st option in the drop down.
Thanks Rahul.

I tested using pre-skip. Quota did not capture any values so I change to post skip and it worked.
It should be preskip only. I think you are missing something.
Applying preskip is not capturing quota value - that means your constructed list is not formed.

Postskip to next question is actually of no use.
Your are right. I just created a cell for each item within one quota variable. In order for this to work, each item needs to have its own quota variable. Preskip works with individual quota variable for each item. Thank you.
...