1. What is the issue? Please be detailed.
I created a form for my questionnaire using XLS. I included a calculation command to calculate participants' score as soon as the last question is answered. When I tried to validate the form on ODK (https://getodk.org/xlsform/), it gave me the error message below:
Error: ODK Validate Errors:
Something broke the parser. See above for a hint.
Error evaluating field 'totalCapacityScore' (${totalCapacityScore}[1]): The problem was located in Calculate expression for ${totalCapacityScore}
XPath evaluation: type mismatch
This field is repeated:
${repeatConsentCapacity}[1]/researchPurpose[1];${repeatConsentCapacity}[2]/researchPurpose[1]
You may need to use the indexed-repeat() function to specify which value you want.
Caused by: org.javarosa.xpath.XPathTypeMismatchException: The problem was located in Calculate expression for ${totalCapacityScore}
XPath evaluation: type mismatch
This field is repeated:
${repeatConsentCapacity}[1]/researchPurpose[1];${repeatConsentCapacity}[2]/researchPurpose[1]
You may need to use the indexed-repeat() function to specify which value you want.
... 11 more
The following files failed validation:
${V1_26082023_Capacity} to Consent.xml
Result: Invalid
2. What steps can we take to reproduce this issue?
I am not sure what you mean here.
3. What have you tried to fix the issue?
I have tried to edit the field with the error and compared it with similar forms I had done
4. Upload any forms or screenshots you can share publicly below.