"If category is [x] or [y]/if not...
AnsweredHi there,
Javascript newbie here: I have a single-choice category field with 9 options, and would like a calculation which returns '0' if the category matches either of two options, and returns '1' if it matches any others.
Currently I have:
if(@Stage=="0. Going to Apply"||"Did Not Apply"){0}
else {1}
but this doesn't work - selecting any of the other categories does not change the calculation. Any advice, please?
More broadly, could anyone recommend some useful reading to help me understand JS calculations?
Many thanks!
-
Hi Rob,
@Stage=="0. Going to Apply" || @Stage=="Did Not Apply" ? 0 : 1
You have to repeat the complete IF condition after OR.
A good JS Tutorial you find here http://www.w3schools.com/js/default.asp
Rainer
Please sign in to leave a comment.
Comments
2 comments