Have an idea?

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

Hide an option

Hi guys,

First time asking question so don't be hard on me :)

I want to hide an option for a question based on a previous one e.g. Hide "Use alcohol" option if respondent said they are under 21. Is using a List the only option? Can I just write somewhere something like
 if (Q1 <21) {
Hide Q2[2];
where Q2[2] is the Alcohol option?

Thanks in advance,
Kaloyan T.
asked Oct 6, 2015 by KaloyanT (315 points)

1 Answer

+1 vote
You need to create constructed list.. Lets say, our list is Q2List where we have 5 options, in which User Alcohol is 2nd option. Create constructed list, i am creating Q2Con and code would be

Begin Unverified Perl
End Unverified

Use Q2Con for Q2 quesiton list.
answered Oct 6, 2015 by Rajesh Rana Gold (24,015 points)
Thanks for the follow-up! I find the following script more clean to use:
Begin Unverified Perl
if (VALUE('Q1')<21)
End Unverified

Anyway, cheers!