The problem was located in Relevant

Hi,

I am getting this below error, help me solve this issue.

Error: b"ODK Validate Errors:\n>> Something broke the parser. See above for a hint.\nError evaluating field 'sec_2': The problem was located in Relevant expression for ${sec_2}\nXPath evaluation: cannot handle function 'selected' requires 2 arguments. Only 1 provided.\nCaused by: org.javarosa.xpath.XPathUnhandledException: The problem was located in Relevant expression for ${sec_2}\nXPath evaluation: cannot handle function 'selected' requires 2 arguments. Only 1 provided.\n\t... 11 more\n\nThe following files failed validation:\n${Consumer_Questionnaire_ESCOM_V1}.xml\n\nResult: Invalid"

Hi @Kiran

could you attach the xls form? I think the problem is caused by cannot handle function 'selected' requires 2 arguments. Only 1 provided
but I can't see in the attached screenshot.

Hi @Grzesiek2010,

Thank you so much for your response. I figured it out.

Regards,
Kiran

Can you please help me in the solving a similar error in my document.Endline_CG_Quantitative.xlsx (45.2 KB)

Can you please tell how you solved it?

you can reach me on this number 9663879640

Hi @Francis_Simon

the way you use selected function is wrong. Please take a look at the documentation:
https://docs.opendatakit.org/form-operators-functions/?highlight=count%20selected#selected
https://xlsform.org/en/#relevant

For example in row 159 you have something like: selected(${hc202_1},'4' and ${hc205_1},'<60') it should be rather selected(${hc202_1},'4') and selected(${hc205_1},'<60') etc. another thing is taht we don't support using operators like > < <= >= in that function.

1 Like

Thank you for the answer. You have helped me to solve the question that was mind-boggling for a long time.

Thank you so much.

Hi @Grzesiek2010

Can you assist me on the same. I getting a similar error when I try to deploy the form. I have attached the form below.
Fred_form.xlsx (34.9 KB)

Regards,
Fred.