1. What is the problem? Be very detailed.
I am trying to return one of the five values below using a if statement in the attached form. I keep getting the following error message when converting to XML.
Error: ODK Validate Errors:
XForm is invalid. See above for the errors.
: Invalid calculate for the bind attached to "${suitability}" : Mismatched brackets or parentheses in expression if(( ${Score} <0.5),'Poor',if(( ${Score} >0.5 and <0.59),'Below Average',if(( ${Score} >0.6 and <0.69), 'Average',if(( ${Score} >0.7 and <0.79), 'Good',if(( ${Score} >0.8),'Excellent', 'error'))
The following files failed validation:
${HSI_V01}.xml
Result: Invalid
Values
<0.5 = poor
0.5 – 0.59 = below average
0.6 – 0.69 = average
0.7 – 0.79 = good
0.8 = excellent
2. What app or server are you using and on what device and operating system? Include version numbers.
I am using ODK collect on andriod. Via google sheets. Converting form via https://opendatakit.org/xlsform/
3. What you have you tried to fix the problem?
I have tried modifying the if statement. I have not got much experience with if statements so any help would be much appreciated. Thanks in advance
HSI_V01.xlsx (13.3 KB)