Replaxing Xpath issue

This error keeps appearing when preview form is selected:

“There has been a problem trying to replace ${undefined} with the XPath to the survey element named ‘undefined’. There is no survey element with this name.”

I have tred to solve through validation (link sent before) but issue still persists

Please help

Did you check the form with the online validator?
There may be a ${undefined} reference in your survey sheet.

1 Like

aREd7DEzjknH4VWmBjATZ2 (1).xlsx (51.2 KB)
ive checke dthe form (attached) with the online validator and have received the following errors(attached also)

I am not really sure what these mean, if an example of one change can be given so i can continue on with the rest??

In row 32 you use ${undefined} in relevant. Probably must be ${Rate_the_level_of_support_received}, see row 430.

Beside this error (red), there are warnings (yellow) from the online validator, that some groups do not have a label. This is often OK: if group is invisible and only used for internal grouping of questions.

But you will get two more validation errors, when you go on:
“Error: There has been a problem trying to replace ${These_measures_were_effective} with the XPath to the survey element named ‘These_measures_were_effective’. There is no survey element with this name.”
It must probably be ${These_measures_were_effective_001} in row 615 and 616.

Side-note: Normally you should not get a $given_name column. This marks an automatic change of the original question/variable name by KoBo during form development, e.g. shortening, replacing invalid characters or adapting duplicates. This can cause reference errors, as only the name but not the references are adapted… It has probably happened for “These_measures_were_effective” - now “These_measures_were_effective_001”.

I would recommend to check with the online validator often during form development and also to control for $given_name. This will make it much easier to locate errors and problems.

1 Like

Few methodological hints, if you allow:
Looking at your complex and long questionnaire,

  • I had the feeling that there are 3 hierarchical levels mixed: community, household, respondent. How are they relating? 1 community <–> 1…n households <–> 1…n respondents/individuals.
  • For your geo-location: division → province → district selection, you may use a cascading select (with choice_filter). This would e.g. avoid having multiple variables for the same level.
  • Almost all variables are optional? E.g. number of household members for a selected age-group. (required = true is only validated by the system, if the question is “relevant”).
  • I would recommend a full and realistic pretest for this questionnaire, incl. interview time.
  • It would also be preferable to check for the export and further analysis process of these data before data collection, even before finalising your form. E.g. for SPSS leading _ are invalid for choices and variable names, and for advanced SPSS features you may need numeric names for choices .
1 Like