Currently trying to input a calculate function on my form
Calculate function is
=IF(${How_many_days_in_the_past_one__004}<1,1,IF(${How_many_days_in_the_past_one__004}>=1,2,IF(${How_many_days_in_the_past_one__004}<=6,2,IF(${How_many_days_in_the_past_one__004}>6,3))))
It works on excel, but not when deploying the form to the server. Attempting to change values for another calculate function
When attempting to delpoy, kobo says this
your form cannot be deployed because it contains errors:
Unexpected KoBoCAT error 400: {“detail”:“ODK Validate Errors:\n>> XForm is invalid. See above for the errors.\norg.javarosa.xform.parse.XFormParseException: Invalid calculate for the bind attached to “${dairy_vit_A_code}” : Bad node: org.javarosa.xpath.parser.ast.ASTNodeAbstractExpr@7a0ac6e3 in expression =IF( ${How_many_days_in_the_past_one__004} <1,1,IF( ${How_many_days_in_the_past_one__004} >=1,2,IF( ${How_many_days_in_the_past_one__004} <=6,2,IF( ${How_many_days_in_the_past_one__004} >6,3))))\n\nResult: Invalid”}
Trying to put in an extended if code for calculating household hunger scale. Need output values of 0, 1 or 2. The question before is a yes/no question with a skip logic built in, hence why I was thinking of adding an ‘and’ function. Before using just if, i was getting a value of 1