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

Hi there,

I have tried to deploy a survey and the error message: ‘There has been a problem trying to replace ${} with the XPath to the survey element named ‘’. There is no survey element with this name’ appears.

I have no idea how to resolve this as the error message does not specify what the actual survey element is that is causing the problem. I would appreciate any assistance with this issue as the survey needs to be deployed soon.

Thanks

Hi @TPS1879 and welcome to the community!

This error message occurs mostly because of two reasons:

  • You used a variable in your form which you’ve not defined.
  • You used a variable which KoBo uses for something else. (So far we think: data, model, start, end)
  • You used a variable which is too long (awaiting confirmation on this one)
  • You’ve used some non-latin characters (awaiting confirmation on this one too)

Most recommended solution is to check name and list_name in your form, and try to see if there are possible problems.

And if you share a screenshot of your choices tab in your xlsform, community might help you.

1 Like

Hi there,

Thanks for your prompt response!

Here is a screenshot of the choices tab also showing name and list_name.

Please can you also advise on how to resolve these issues in the Kobo webpage version of the survey. Once changes are made to the downloaded XLS form, I am not sure what happens next with the online version i.e. whether changes are automatic, whether I can re-upload the XLS form to update the online version or whether I need to start a new survey

Thanks for your support

Here is another screenshot of the choice tab

Hi @TPS1879,

You need to upload your XLS form to update the online version of your form, you can find more information in the help article: Getting started with XLSForm — KoboToolbox documentation

There is a post from @stephanealoo, which in your case gives a valuable explanation about ending names with underscore ( _ )

I think they are created by the KoBo Form Builder automatically, but erasing the underscores at the end of your names, might help you. For example, can you try changing:

  • respondent_has_a_productive_activity_in_ to respondent_has_a_productive_activity_in

to see if that works.

1 Like

Hi,

I’ve removed underscores for names for both the survey and choice tab and then re-uploaded the XLS form but unfortunately the error message is still appearing when I try to deploy the survey. I also checked for the variable terms you highlighted (data, model, start, end) and removed ‘start’ but unfortunately that also didn’t have an effect.

@TPS1879,

Can you also check your form in here: ODK - XLSForm Online v2.x to see any syntax errors?

1 Like

I submitted the XLS form to the ODK online validator and it highlighted several rows lacking a label e.g. [row : 19] Group has no label: {‘name’: ‘group_ud5ge80_header’, ‘type’: ‘begin_group’}

I’ve attached a screenshot of the XLS form where the syntax issue is highligthed

I tried deleting the rows with the syntax errors (lack of labels) but that didn’t seem to work when I re-uploaded the form. Would you recommend giving the rows arbitrary labels or is there something else I should do to resolve the syntax errors?

Thanks

Group rows shouldn’t affect your problem, but I suggest changing names to shorter ones.

1 Like

Okay thank you

Just to clarify, do you mean the names on the survey tab or the names on the choice tab or both?

@TPS1879 I would suggest both. But starting out with choices tab would help to troubleshoot the main problem.

1 Like

I’ve shortened the names for both. Now when I try to deploy, a different error message appears: ‘There has been a problem trying to replace ${What_best_describes_the_type_o} with the XPath to the survey element named ‘What_best_describes_the_type_o’. There is no survey element with this name.’

I’m not sure how to fix this or whether the original problem has been fixed

Welcome @TPS1879,
maybe @Kal_Lam can configure that you can upload your xlsx here. I would suggest with the initial version which created the ${} error.
(Pay attention, please, not to publish sensitive data with the xlsx here.)

1 Like

Hi there @wroos , I’d like to but when I try to upload the file it says that new users cannot upload attachments! Do you know a way round this?

@TPS1879, you should now be able to upload your XLSForm in the forum.

Original enterprise survey.xlsx (43.5 KB)
Hi there, here is the original version of the XLS form. I’d appreciate any help you can give in identifying the problem!

Thanks

@Kal_Lam or @wroos , I’d appreciate any help you can give!

Hello @TPS1879,
you can easily find the places by searching the survey sheet with ${} as search token. For ex. rows 488 to 497. As the error message indicated the variable names in the reference are missing.

1 Like