XLS Form Building Error / Error: ODK Validate Errors:

A message just showed like this, see below:

Error: ODK Validate Errors:

Something broke the parser. See above for a hint.
Error evaluating field 'Building_alliances_Calcualtion' (${test}[1]/Building_alliances_Calcualtion[1]): The problem was located in Calculate expression for ${Building_alliances_Calcualtion}
XPath evaluation: cannot handle function 'IF'
Caused by: org.javarosa.xpath.XPathUnhandledException: The problem was located in Calculate expression for ${Building_alliances_Calcualtion}
XPath evaluation: cannot handle function 'IF'
... 10 more

The following files failed validation:
${test}.xml

Result: Invalid

What is that mean, when telling {XPath evaluation: cannot handle function 'IF'}, and how to solve this problem.

Hi @Younes_Al-Qryouti
We're glad you're here. When you get a chance, please introduce yourself on this forum thread. I'd also encourage you to add a real picture as your avatar because it helps build community!

The if function should be lowercase so if(expression, then, else) not IF(expression, then, else)

Many Thanks, I`ll do.

I am new here. My name is Francis from Ghana and very much interested in ODK and ready to learn

I got almost the same feedback and i am stock
Can someone please help me.

I am new:
ODK Validate Errors: >> Something broke the parser. See above for a hint. org.javarosa.xpath.XPathException: XPath evaluation: Parse error in XPath path: [instance('countries')/root/item[Lao PDR]]. Couldn't understand the expression starting at this point: .../root/item[Lao͎PDR] The following files failed validation: ${tmp_qdurmxg} Result: Invalid

Your file should have the .xlsx, .xml file extension because Ona uses XLS Forms to create forms.

Not sure what to do? Read more aboutUsing XLSForms

Hi @Abro
Were you able to solve your problem? If not please attach your form and we will try to help.

Lao PDR_eSurv.xlsx (163.9 KB)
HI
Thank you for your response.
Please see the attached file of the project i was trying to create and help me to identify my errors.

Thank you.

The first mistake is in row 11 in choice_filter column. You have there Lao PDR. I think what you wanted to add is countries=’Lao PDR’?

Then there is another bug in row 58. The question name is list_of_community_informants and the logic you have in relevant column is ${list_of_community_informants}='Y' or ${list_of_community_informants}='N'. You can't hide/display a question based on its own answer.

The same problem in row 62.

That should be it.