Have an idea?

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

Skip according to respondent number

I have a list of 162 multi-select items and they are split into 5 set subsets. We want each respondent to only see the members of those subsets (because 162 items is a ton) divided into 2 pages, based on their respondent number.

I was thinking to create 10 separate questions containing the subsets and try to skip certain questions based on the respondent number remainder when divided by 5.

How could I accomplish this or is there a better way to accomplish what I need.
asked Jul 13 by LonelyEskimo (195 points)

1 Answer

+2 votes
What you are describing is known as the modulo operator (usually represented with the percentage symbol).  Consider this example skip logic:

sys_RespNum() % 5 = 1


The part left of the equal symbol will divide the respondent number by the number 5 and give you the remainder of that division.  Then the skip will fire if that remainder is equal to 1.

That being said, there may still be better options.  Modulo will give you an even number of people sent into each group, but will not ensure you have an even number of completes in each group come analysis.  "Even Distribution Quota" from the Community Question Library attempts to dynamically fill out groups by sending respondents into whichever group has the fewest completes.  You can learn more about it here:

https://sawtoothsoftware.com/community-question-library/1808-even-distribution-quota
answered Jul 13 by Zachary Platinum Sawtooth Software, Inc. (93,550 points)
SSI Web keeps telling me % is not a valid character.  Is there some setting that I am missing?
You received an error message when you copy-and-pasted my code into a skip's logic?

Can you tell me what version of SSI Web you are running?
I am running version 8.4.8. I put the code into the skip logic. Not sure whats wrong, I am pretty new to this software.

 However, I figured out a way to make it work.  I used a constructed list and used the RESPNUM() % 5 function there and it let me show different selections based on the remainder.  Thanks so much this really helped!
Oh sorry, my bad for the confusion.  Unverified Perl uses "%" as the modulo operator.  Sawtooth Script actually uses the word "Mod" as the operator.

sys_RespNum() Mod 5 = 1
Oh gotcha. Thank you that's very good to know!
...