Have an idea?

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

Constructed List Question

I am trying to construct a list that will be used for the Rows in a Grid Question. I have a parent list with three members (Q15oneRowList) and I want the third member to only appear if the respondent selects more than one item in a previous multiple select question (Q7) with 11 items.

Currently, what I have is:

Begin Unverified Perl

End Unverified

However, the third member of the list still shows up regardless. How can I correct this?
closed with the note: Thanks Jay! What a silly mistake
asked Nov 8, 2017 by jzu633 (190 points)
closed Nov 9, 2017 by jzu633
Your code appears to be correct.  Can you check that your grid question is using the constructed list instead of the predefined list?
Happens to us all, just glad it was an easy fix for you.  As a side note, many times when dealing with similar things I'll simplify by creating a constructed list of the selected answers from (Q7 in this case) and then I can just call on the list length of the constructed list if I need logic based on the number of items selected.

1 Answer

0 votes
Best answer
From your code it would appear you are telling it to REMOVE the 3rd item if more than one item as been selected (>1).  If you want to show only if they selected more than one item at Q7, then you would want to remove it if the sum of the Q7 checks is <2 not >1.
answered Nov 9, 2017 by Jay Rutherford Gold (22,225 points)
selected Nov 9, 2017 by jzu633