I'm trying to write a simple if statement in a survey123 form that will perform a calculation if the condition is true and perform a different calculation if the condition is false. It places a string of junk in the calculated field, instead of calculated values, if I remove the calculations the if statement works just fine. Can anyone help me on this?
if(${Static_Water_Level}<(${Installed_Depth} - ${Screen_Height}), ${Installed_Depth} - (${Screen_Height}div2), ${Static_Water_Level} + ((${Installed_Depth} -${Static_Water_Level})div2)) |
Solved! Go to Solution.
Hi Grant,
It looks like there are no spaces in the calculations - you should separate parts by space (i.e., ${Screen_Height}div2 should be ${Screen_Height} div 2 ). That allows calculations to work in my testing.
Hi Grant,
It looks like there are no spaces in the calculations - you should separate parts by space (i.e., ${Screen_Height}div2 should be ${Screen_Height} div 2 ). That allows calculations to work in my testing.
That worked! Thanks for your help.