You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started an instance expression with ${ (${instance('filename')/root/item). Naturally, that doesn't work so I got an error: There has been a problem trying to replace ${instance('filename')/root/itemwith the XPath to the survey element named 'instance('filename')/root/item'. There is no survey element with this name.
This was on the entities sheet so it took me a while to find. It's not the first time this has happened to me. It has also happened from the settings sheet because I sometimes write an instance_name expression and then change the form structure without updating that expression.
Steps to reproduce the problem
Include a badly-formed ${} expression on the entities or settings sheet.
Expected behavior
There's an indication of the sheet the error is coming from.
Other information
Things you tried, stack traces, related issues, suggestions on how to fix it...
The text was updated successfully, but these errors were encountered:
The case shown above would be caught by the syntax check in #734. However for a syntactically valid placeholder / reference, the error message doesn't say which sheet the bad placeholder is in, so this could be improved. e.g.
| survey | | | |
| | type | name | label |
| | text | id | Tree id |
| entities | | | |
| | dataset | entity_id | |
| | trees | ${idx} | |
Raises
ERROR: 'There has been a problem trying to replace ${idx} with the XPath to the survey element named 'idx'. There is no survey element with this name.'
Software and hardware versions
pyxform v2.0.3
Problem description
I started an instance expression with
${
(${instance('filename')/root/item
). Naturally, that doesn't work so I got an error:There has been a problem trying to replace ${instance('filename')/root/itemwith the XPath to the survey element named 'instance('filename')/root/item'. There is no survey element with this name.
This was on the
entities
sheet so it took me a while to find. It's not the first time this has happened to me. It has also happened from the settings sheet because I sometimes write an instance_name expression and then change the form structure without updating that expression.Steps to reproduce the problem
Include a badly-formed
${}
expression on the entities or settings sheet.Expected behavior
There's an indication of the sheet the error is coming from.
Other information
Things you tried, stack traces, related issues, suggestions on how to fix it...
The text was updated successfully, but these errors were encountered: