1. What is the issue? Please be detailed.
When changing the form language, jr:choice-name()
does not appeared to be re-evaluated.
Swiping backwards and forwards is enough to update calculations that are triggered by a variable, but calculations without implicit or explicit triggers are never updated.
When expressions are evaluated suggests a number of points when expression will be evaluated, but we've noticed when passing static values into jr:choice-name()
sometimes a calculation
could go through multiple form submissions without being re-evaluated.
2. What steps can we take to reproduce this issue?
Calculate a variable with jr:choice-name()
and then change the language.
3. What have you tried to fix the issue?
We've tried adding a trigger value based on the last user-selected choice in the form. This mostly works, but still requires a user-initiated change (which doesn't work, for example, if the calculated value needs to be displayed on the first page in the form).
4. Upload any test forms or screenshots below.
ODK - jr_choice-name() test v2.xlsx (14.7 KB)
UPDATE: I added a v2 of the test form and screen recording that more clearly shows the two failure situations, specifically:
- Notice how after changing the language, neither of the calculated values have been translated.
- Notice after swiping backwards and forwards, the calculated value with an implicit trigger on
${veggie}
is updated, but the one based on'carrot'
is not.