Uploading an XLSForm to ODK central

Hi,

I have created an xls form that I want to upload for testing. However, I keep getting this error Error:

The XLSForm could not be converted: ODK Validate Errors:

XForm is invalid. See above for the errors.
: Cycle detected in form's relevant and calculation logic!
The following nodes are likely involved in the loop:
${date_of_death_know_other_ombadda}
${death_year_know_other_ombadda}
${name_know_other_ombadda}
${agemem_know_other_ombadda}
${knowdate_know_other_ombadda}
${know_other_ombadda}
${sexmem_know_other_ombadda}
${address_of_know_other_ombadda}

The following files failed validation:
${Mort-Fol-Pilot}.xml

Result: Invalid

I am not sure how to solve this error and I would appreciate your help.

Many thanks

Welcome to the ODK forum, @R-abukoura! 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 picture as your avatar because it helps build community!

Are you able to post your XLSForm file here? It will help someone troubleshoot the problem.

1 Like

Can you share your XLSForm?
What may be happening is in the 'relevant' expressions for the fields (date_of_death_know_other_ombadda, death_year_know_other_ombadda, name_know_other_ombadda, etc) you may have made reference to the same fields.

2 Likes

Hi Clement,

Thank you for responding.

I have managed to solve the issue a few days after and like you said I had made references within the same fields.

1 Like

A post was split to a new topic: Error when uploading XLSForm

PHC DGA 11-12.xlsx (165.6 KB)
I am also facing a similar issue. On submission for validation showing "Cycle detected in form's relevant and calculation logic! ". I don't know what is wrong in my form. Kindly help

I haven't looked at the form in detail but I believe the issue is with patient_pnc and que_pnc. You can't calculate que_pnc based on patient_pnc and then use it in the relevance and repeat_count settings for patient_pnc. I've confirmed that the form converts without error if I change the relevance and count for patient_pnc to use pat_avl_pnc. You may want to start a new thread describing what you're trying to do so we can find a good way to address the need.

To figure this out, I started by converting the form directly in Central and saw a huge list of fields involved in the cycle. That didn't feel right to me so I put the form in a test so I could debug it. I was able to identify a smaller number of fields more likely to be involved in the cycle. I believe there is a problem with how fields involved in cycles are being reported and will dig deeper into that.

Welcome, @PP_mgrgov, it's nice to see you here and thanks so much for introducing yourself. Consider sharing some of your work in the Showcase at some point. I'd be very interested in learning more about how you manage very large forms. Are you managing XLSForms by hand? Do you have a system for managing versions? For verifying forms as they get updated?

Thank you so much for pointing that out! I was aware that there is some mistake in that begin_repeat (que_pnc) section but didn't realise it is affecting the whole form logic!. The form is validated after I corrected that part!

Currently, I am handling the forms manually. It is tedious, definitely. My team has built a conditional formatting for handling the different versions of the form online. So the version gets updated, as per the date last change was made. To validate, I download and submit to enketo. Currently, I have no other way to handle it. But would like to know if there a way to manage it more efficiently. Also, since the form is huge, there are many labels and question numbers. Even if one question is removed or added, whole numbering needs to be edited every single time. It will be great if there can be a tool which will make this task easier. or if the question number can be in a separate column altogether, so that it can be cleaned up at the end.