Have an idea?

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

Skip logic in loop

Hope somebody can help me with this.

What I am trying to do is that I first have an row based grid with multiple answersoptions. After this grid I want to create a loop of 3 questions where the row list from the grid question is the LoopList.
And here comes the tricky part, which of the 3 questions should be shown at each time should depend on the answers from the grid.

So if the grid name is G01 and the loop questions is L01, L02 and L03, then in the first loop L01 should only show if G01_r1_c1 is marked and in the second loop only if G01_r2_c1 is marked. L02 should only show if same is for _c2.

This would be easy if unverified perl could be used in Skip Logic but it cant. So I can set an pre skip on L01 like Value(G01_r1_c1)=0, but then it would only work in the first loop. I need a skip like [% Value("G01_r".LoopValue()."_c1")=0 % ]

Is there a workaround or any way to do this?
asked Feb 22, 2013 by birkir (145 points)
retagged Feb 22, 2013 by Walter Williams

1 Answer

+1 vote
You can insert the Perl code into a constructed list and only get a particular member from the list based on what was mentioned in the grid question.

Setup a parent list with members 1-2-3. Assume the constructed list gets members 1 or 2 or 3 depending on how the grid was answered.

You can then use the ListValue() function based on the constructed list in skips.
answered Feb 22, 2013 by Paul Moon Platinum (67,780 points)