We’d like your help validating an update that makes performance improvements and a change to relevance to align with ODK Collect.
Please either share your complex forms in this thread, private message them to me, or try them yourself in the Enketo preview available at https://getodk.org/xlsform. This is running new code we would like to verify against your forms. The things to look for are unexpected behavior (e.g. a calculation not having the value you expect, a question appearing when you expect it to be hidden) or poor performance. Issues are most likely to show up in nested repeats or with calculations/relevance statements that involve many other questions.
Performance. The new release includes several performance improvements including a risky one that’s off by default (see below). Forms with repeats in particular should load more quickly.
Relevance. Non-relevant values in Enketo have historically been used in all calculations including in relevance conditions for future questions, a deviation from ODK Collect. This means that values that are not displayed can still affect the behavior of the form. This can cause unexpected behavior when editing existing answers either within a form filling session or on the server after submission. This change does NOT affect submissions: non-relevant values have always been omitted from submissions.
Consider this form definition and animated gif below. The Enketo 3.x (currently deployed) behavior is on the left and the Enketo 4.x (upcoming, matches ODK Collect) is on the right.
With Enketo 3.x and prior, if you answer ‘yes’, ‘yes’, ‘no’ and then change the phone_ring to ‘no’, the speak_english question and the ineligibility message will still be displayed.
With the change we have made, non-relevant fields, including fields in non-relevant groups or repeats, will always evaluate to blank. The speak_english question and the ineligibility message will therefore be hidden when the phone_ring is changed to ‘no’. However, the values will still be maintained so that if you change the phone_ring back to ‘yes’, all of the previously-captured answers will be restored. This behavior matches ODK Collect.
We have turned on the new behavior at https://getodk.org/xlsform. The change is part of the Enketo 4.x release but off by default. We intend to turn it on for the Central v1.6 release (Fall 2022).
We have an additional riskier performance improvement that we are considering. This is most likely to help forms with relevant or calculate expressions that reference or affect many questions (e.g. 500 questions shown or hidden by a consent question).
If you have a slow form, you can try this by adding
&computeAsync to the end of the preview link (click in the address bar and paste it at the end). The things to look for here are visual glitches and unexpected computation results.
If your form does feel faster, please let us know. If we don’t receive feedback that it is helpful, we will remove it.