Have an idea?

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

If_else construction with shown question relation

I can return the ACBC Winning Price with this expression:

I can return my VWD Price with this expression:
[% (VWDLI1+VWDLI2)*0.5 %]

But I need an if_else logic, because only one price should be shown.
Everyone will see VWD Section but only a part will see ACBC so I want to show ACBC Price if ACBC is shown and VWD if ACBC is not shown.

Any solutions?
asked Jan 17 by Honeybadger Bronze (890 points)
What logic in the survey is controlling whether a respondent sees the ACBC?  If a skip or a constructed list is defining this behavior, we should be able to use the same logic here.
Constructed List is defining what a respondent has to conduct
So the presence of a certain item in the constructed list tells us that the ACBC was shown?  If so, the function ListHasParentMember is the way to go.

[% Begin Unverified Perl
    return ACBCWINNERLABEL('ACBC', 5);
return (GETVALUE('VWDLI1') + GETVALUE('VWDLI2')) / 2;
End Unverified %]
It works! Thank you :)

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.