Error when uploading an XLS form

Hi ! I am experiencing a similar issue. Kobo won’t deploy my xls form and I cannot understand where the problem comes from. It’s telling me : your form cannot be deployed because it contains errors: No JSON object could be decoded.
When I open the questionnaire preview it gives me the same message as mahmed plus “FormLogicError: Could not evaluate: §{Age} < 18, message: The expression is not a legal expression. (line: undefined, character: undefined)
There seems to be something wrong with my relevant criteria but I can’t find the source of the problem. here are my criteria :
§{country} = ‘bosnia’ or §{country} = ‘belgium’ or §{country} = ‘croatia’ or §{country} = ‘tunisia’
§{Age} < 18
§{reference} = ‘yes’
I have checked the formulas and names mutiple times.

Hi @VDeom
This is a different issue from the one and I have thus separated the two. This is an issue with your form logic as you have stated. Kindly confirm that that the entire formula below is in the skip logic place?

If that is the above case, then this is not definitely possible. Could you try explaining the logic you would have wanted to implement in a narrative format?

Stephane

hi Stéphane,

Thanks for your response. To make it clearer this is a questionnaire about violence experienced by patients during migration.

  • §{country} = ‘bosnia’ or §{country} = ‘belgium’ or §{country} = ‘croatia’ or §{country} = ‘tunisia’ => If have a first “country in which the survey is taking place”. If the country is Bosnia, Tunisia, Croatia or Belgium, a subquestion regarding the patient identifying number should appear.
  • I then have a birthdate question. This question is followed by the “Age” question which is automatically calculated using this formula (${collection_date}-${birthdate}) div 365.25. I have thus created a calculation column.
  • Two questions in my questionnaire should appear if the patient is under 18. For these 2 questions I have written this skip logic : §{Age} < 18
  • Finally, the last question is about references to other medical services. If yes is chosen for the first question (‘was the patient referred to other services?’) then a list of possibility should appear.

My problem is that it seems that all my skip logics are incorrect. When I upload the xlsform and open the questionnaire preview, the error message only mentions the first skip logic but if I remove it and upload my questionnaire again, the error message mentions the second one and so on.

I hope this is clear enough.

Thanks !

Hi
Can you send the XLSform if it does not contain any sensitive information?

Stephane

Dear @VDeom
Just an idea: It seems as you use a wrong character: §, instead of $ for your ${…} references.
Kind regards

2 Likes

A post was merged into an existing topic: Introducing kobo2stata (new on SSC)