Error message seen: There has been a problem trying to replace ${} with the XPath to the survey element named ‘’. There are multiple survey element with this name

Hello
The error is that of the object, with $ {data}
There is no deploy-error, and in fact I can use it very well in enketo web, but I would also like to use it in kobo-collect, to be able to insert the map offline
and kobo-collect fails to load the form
probably due to this error.
But the formula

concat(${abbr_nome},${abbr_cognome},format-date(${data},’%y%m%d’),${progressivo})

which works in enketo web
it refers to a single element (I have just registered, although I have been consulting the forum for some time, and I still do not have permission to upload files; eventually I can make you a link to a cloud)
${data} is a datetime

Welcome to the community, @bonushenricus! My advise here would be that you check it manually to see which expressions is not working. For this you will have to keep the question and the expression (in your xlsform) that is not working and check to see if the same is an issue. Once this is cleared, you will need to move on with other issues which could be an issue. You will need to repeat this until you find the issue. Once you find the issue, you could then share the issue with the community. This should save the communities time and it would also be a learning for you (where you would learn which expression is not working and why).

If I change the name of the field from “data” to “giorno_ora” and obviously I also change it in the formula, there are no more problems with kobocollect and odkvalidate.
So it means that in odk and not in enketo, “data” is a variable already used, so an element of the survey cannot be called “data”

So has this solved your issue?

Hello @Kal_Lam ,
Do we have a hint on this (and other reserved words) in the documentation?

We had something similar e.g. with “model”: https://community.kobotoolbox.org/t/online-validator-is-clean-but-error-message-expecting-value-line-2-column-1-char-1-seen-when-uploading-an-xlsform-in-the-server/18404/9.

Also with “start” and “end”: https://community.kobotoolbox.org/t/xml-as-requested/82/3
Kind regards

@wroos, we will have to check it out. Maybe we could do this once @bonushenricus confirms the same and shares with us the xlsform for testing that has this issue.

1 Like

controllo_ovature_nuovo.xlsx in dropbox

@bonushenricus, do you confirm that the variable name you used as data did not work and when you changed the name to something else it worked?

Yes. I confirm. But the problem is only in kobocollect and odkvalidate. No deploy error in koboform builder. No problem in enketo.

OK, could you share the xlsform that has this issue (with the community)? Kindly please only keep the question that triggers the issue.

Note: You should now be able to share your xlsform with the community. If you should have issues, please refresh your page.

Hello
in the post 4 days ago

I had already shared the xlsx form
(in dropbox, because I don’t have permission in this forum to attach files yet)

Hello bonushernricus,

Attached is the revised version, which I can verify and work perfectly from my side. I had highlighted the changed part in excel for your reference.

controllo_ovature_nuovo_revised.xlsx (21.7 KB)

The error is that of the object, with $ {data}. and there is no name with the data and which I assume it’s a date. So I added the label name date in the beginning. Please do refer to the excel with highlighted.

1 Like

Thank you.
The name {data} is also in your revision, then you haven’t used it in a formula and so it seems all right, but it’s not okay, because if I wanted to use it it wouldn’t be possible.
I believe we now know that {data} should not be used as a formula field name
I edited all 42 submissions by re-entering the datetime value in a new field with a different name.
And then I redeployed the xlsx form without the {data} field anymore.
I hope this post will serve others to avoid this undocumented detail