There is no survey element with this name

1. What is the problem? Be very detailed.
I have stumbled upon another query when I try to covert the xls form.
I have tried both methods in the 'relevant' column in the yellow and green highlighted rows (see form attached). No matter how much I try to troubleshoot, this is the query I keep getting below:
Error: There has been a problem trying to replace ${de_contraception_method} with the XPath to the survey element named 'de_contraception_method'. There is no survey element with this name.
If we look at the questions highlighted in YELLOW, the response should be a 'yes' or 'no' answer but the choices section has different specific options (scroll down to see green highlight in choices tab), hence the use of the codes in the 'relevant' column. I may be wrong with what I think is the issue(s).
Please advise on the next steps.
Thank you so much in advance.

Please see attached GHDT-FamilyPlanning_mo.xlsx (36.5 KB)

where is you write in question or row no I have no seen de_ except relevant
de_contraception_method

The question is in the xlsform attached and highlighted in yellow on the sheets tab

Hi @SopeO

The error is in cells:
As the debug message says, you are trying to recall a variable ${de_contraception_method}, which is not defined in your form.

Based on the questions, I think you meant to refer to options selected at question #52. That variable name is "de_no_preg".

Also note that you have other typos:

  • in cell J104: I think ${de_FP_setting_FP} should be ${de_FP_setting}
  • in cell J112: I think ${de_Fptopic} should be ${de_FPtopic}
  • in cell J97: you should remove the "=" sign from the expression
  • in cell J118, J120, J122, J124: you should edit the formula, possibly with: selected(${de_FP_setting}, '1') or selected(${de_FP_setting}, '2') or selected(${de_FP_setting}, '3')

Once you correct the faulty cells, the form validates correctly. (see GHDT-FamilyPlanning_mo_AM.xlsx (33.3 KB) )

I hope this helps!

Best,
Andrea

3 Likes

Thank you so much for pointing out all those errors. I edited the XLS form and it worked.:blush::blush::blush::blush:

2 Likes

You're welcome!
Glad it worked :slight_smile: