Validate errors: dependency cycles amongst the xpath expressions

Hi @Adan
welcome to the forum! Please introduce yourself here!

Please go through this topic it's not a complex problem and you should fix it on your own, if not please attach your form so that we can take a look.

Damm even I am having a similar kind of issue, I have searched all over the internet and even have posted on number of threads on different forum, no solution seems to work. I am really frustrated, can anyone of you here help me resolve this issue, I am very much tired now.

Hi @miyabhai101
welcome to the forum! Please introduce yourself here!

you need to attach your form since it's a bug there we are not able to tell you what's wrong if we can't take a look at it.

Greetings to you all, I am also getting a similar error on my odk: Dependency cycles amongst the xpath expressions in relevant/calculate Questionniare_odk5NEW-trial.xlsx (12.0 KB)

Hello Emmaj 10,

I found the problem on your xls file. There was mistaken in the calculation. I had corrected it and highlighted in the excel file.

Hope its works for you. I had check the filed and now its working fine in here for in ODK collect.

And also you need to replace ${z1}='yes' by ${z1}='1'.

Please get attached of the file.

Dinesh Dongol
Questionniare_odk5NEW-trial_dnes.xlsx (12.7 KB)

Hi team, I hope you are well; kindly support on this similar error am getting with my questionnaire. Your support will highly be appreciated.
Parents_quiz.xlsx (17.6 KB)
Thanks in advance

line 27:

name=q4a, relevant=selected(${q4a},'0')

its hard to only be 'relevant' to yourself... :grin:

I think you want relevant=selected(${q4},'0'), but you may also want to check the rest of your form for similar, um, D'ohs... :slight_smile:

Surely thanks I needed extra eyes to see that error, It has now worked. Keep on the good work

am getting a similar problem but my error is coming from the constraint column. what i want is a restriction from selecting other options when one selects "none" or "never" or "don't know". I shall be gratefull. attached is the form chauhotspotmapping.xlsx (22.7 KB)

Hello chauvoice2020,

You can use ((. = '-88') or not(selected(.,'-88'))) and ((. = '-99') or not(selected(.,'-99'))) and ((. = '-77') or not(selected(.,'-77'))) in constraint column; which means you cannot select 'none of the above', 'do not know', or 'no response' with other options. . In here -88 means none of the above, -99 means do not know and -77 means no response.

Hope it works for you. Do try it out and let me know if its works or not.

Dinesh Dongol

Thanks Dangol. I had it figured out, the dependency cycle was in relevant column Q16 A.

Questionnaire_for_geop.xlsx (20.9 KB)

experiencing the same problem, but still cant fix it. Gosh!! kindly help

line 32:
select_one yes_no Q19 19. R1.2.2 : Do you keep records of your business? selected(${Q19}, 'No')

line 39:
text Q23 26. If no, why did you not complete the training or learning a trade? selected(${Q23}, 'No')

line 60:
text Q39 39. Did it make a positive differences? selected(${Q39}, 'No')

line 61:
text Q40 40. Did it make a negative differences? selected(${Q40}, 'No')

Go thru all your questions that have a relevance expression, and make sure they dont refer to themself.

This has been very helpful

Cheers !!

Hi! I keep getting this msg:

Something broke the parser. See above for a hint.
Dependency cycles amongst the xpath expressions in relevant/calculate

The following files failed validation:

Please someone can help me pleasepapa.xlsx (25.6 KB)

line 10:

select_one acc_sondage acc_sondage accord sondage À lire à voix haute par le recenseur yes ${acc_sondage}=1

line 27:

select_one consentement consentement consentement ${consentement}=1

line 33:

select_one filiere filiere Comment avez-vous intégré votre filière? yes ${filiere}=4

(and probably a bunch of others...)

You have multiple cases where the relevant expression of a question is dependent on the question itself (!). Please go thru every relevant expression in your form and make sure the show/hide logic is correct; that is, the question must be dependent on something else, not itself.

1 Like

Kindly fix the problem on this file. I finding error when uploading it.


Please anyone can help me this issue:

"ODK Validate Errors: >> Something broke the parser. See above for a hint. Dependency cycles amongst the xpath expressions in relevant/calculate Result: Invalid"

the file attached20201210_Care IYD Beneficiary_CG_JL.xls (162.5 KB)

line 183:

text | IYD_BNF_6_2_q11 | 6.2.11 If 'other', please specify 6.2.11 في حال اختيار "غير ذلك"، يرجى التحديد TRUE selected(${IYD_BNF_6_2_q11},'999')

line 188:

select_one rating IYD_BNF_6_3_q3 6.3.3 If yes, how would you rate how your complaint was handled? 6.3.3 إذا كانت الإجابة نعم، كيف تقيم طريقة معالجة شكواك؟ TRUE minimal ${IYD_BNF_6_3_q3} = '1111'

There may be others... Scan thru all your questions that have a relevant expression, and check that the condition does not include the same label as your question name. A question cannot be relevant on itself.

A post was split to a new topic: XPathUnsupportedException: XPath evaluation: unsupported construct [filter expression]