Copy link to clipboard
Copied
I have 3 options for this field, either they choose "0", "5000", or "10000". Based on that choice I need the next field to calculate the monthly rate *12 then divide by 52 to get their weekly rate. Please help, what am I missing below?
var chrate=(this.getField("ChildVLife").valueAsString);
var morate=0
if(chrate=0) morate=0.0;
else if (chrate=5000) morate=1.00;
else if (chrate=10000) morate=2.00;
event.value=((morate*12)/52);
To compare values use == not only =.
E.g.: chrate==5000
Copy link to clipboard
Copied
To compare values use == not only =.
E.g.: chrate==5000
Copy link to clipboard
Copied
Thank you, worked perfectly.