Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message for nodeset returned when single node expected is generally unhelpful #700

Open
lognaturel opened this issue Nov 16, 2022 · 0 comments

Comments

@lognaturel
Copy link
Member

When a nodeset is returned but a single node is expected, the error message says "This field is repeated:" and "You may need to use the indexed-repeat() function to specify which value you want".

The most common case I see this error in is when a choice filter returns multiple items. Another common case is trying to access a field in a repeat from outside the repeat. The intent is often to use some kind of aggregating function like sum.

The indexed-repeat hint is not useful in either of those cases. It only really applies to parallel repeats. Even then, we try to nudge form creators towards using raw XPath expressions over indexed-repeat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant