Have an idea?

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

Update MaxDIff options on basis of a selection in the previous question

I used the following code to reflect a different option in a MaxDiff exercise; but it doesn't seem to work. Can someone help ? I added this code in the predefined list, should I be creating a constructed list?

[% Begin Unverified Perl
#Condition for displayed text
if    (GETVALUE("Q4HowDoYouUsuallyWatch")    ==    6)
{
return "Never";
}
else
{
    return "Once a year";
}
End Unverified %]
asked Nov 25 by Karuna Tandon (280 points)
Could you clarify what isn't working? Do you always get "Once a year" as the text to return?

Also generally it's not the best idea to change what one of your MaxDiff items are like this since you are using one parameter in the math to represent different things to different people.  I can probably help but it might be better for you to consider running a relevant items MaxDiff: https://www.sawtoothsoftware.com/help/lighthouse-studio/manual/index.html?relevant_items_maxdiff.html
I keep getting "Never" for all responses in Q4. Is it possible to just change the text on the basis of the response?
It would probably be best to email in your .ssi file (or zip up the whole folder and send it in) so we can see exactly what you are trying to do.  It's a bit tricky to diagnose and suggest when we just have the code snippit and not the full picture of the questions, answers and lists involved with what you want to do.  Could you send that in to support@sawtoothsoftware.com?

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.
...