Avatar

Correct answer by
Level 3

I don't believe the syntax works for either formcalc or javascript.  I don't use formcalc much, but in js you would need to do an else if :

if (TextField2.rawValue == 16 | TextField2.rawValue == 17 | etc etc put those other values in here)

{

     this.rawValue = "Low Risk";

}

else if (TextField2.rawValue == 26 | TextField2.rawValue == 27 | etc etc)

{

     this.rawValue = "Moderate Risk";

}

else if (TextField2.rawValue == 34 | TextField2.rawValue == 35 | etc etc)

{   

     this.rawValue = "High Risk";

}

That's just one way.  You could also setup variables and do a for loop, or even do a bunch of case statements using switch.  This above is easy just takes a lot of ors.  You need to make sure you explicitly state TextField2.rawValue == for every or, which is the | symbol.

View solution in original post