-
Notifications
You must be signed in to change notification settings - Fork 109
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
setvalue actions can only use absolute references #360
Comments
Hi, @lognaturel. When you say that "it should use the current context", what do you mean by it? I see that I could manually produce an absolute |
The second param to You've looked at |
Adding #349 (comment) here since I think it's relevant:
|
Software versions
JavaRosa v2.11.2
Problem description
Consider the following form:
(don't mind the field names)
The key thing to consider here is that
/data/repeat_group/selected_person
uses asetvalue
action to set the value of a field taking it from a sibling, whenever that sibling changes its value.The parser is complaining about this form with this error:
XPath evaluation: Attempt to parent past the root node current()../person
.Steps to reproduce the problem
I've pushed a branch to my fork with a form and a test class that reproduces the error: https://github.com/ggalmazor/javarosa/blob/set-value-issue/test/org/javarosa/xpath/expr/XPathPathExprCurrentSetValueTest.java
Expected behavior
The field using a
setvalue
action should receive the value from its sibling without failures.Other information
In #349 (comment) @lognaturel comments:
The text was updated successfully, but these errors were encountered: