Help verify change to relevance behavior to align with ODK Collect

17 views
Skip to first unread message

Hélène Martin

unread,
May 19, 2022, 4:34:25 PM5/19/22
to enketo-users
Hello Enketo enthusiasts,

Trevor (https://github.com/eyelidlessness/) and I from ODK have been leading the development of Enketo as Martijn has reduced his involvement (we’re grateful for his continued collaboration!).

We’d like your help validating an update that makes performance improvements and a change to relevance to align with ODK Collect.

###  Help needed
Please either share your complex forms in this thread, send them to me (L...@getodk.org), 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.

### What has changed
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: https://docs.google.com/spreadsheets/d/1XFg1dzi8ZBxdhSwc_5ZHiTRTCfpt_XszpbjFgqvuPsY/edit#gid=0)

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. (Animated gifs at https://forum.getodk.org/t/37719).

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. Those who run Enketo servers will need to decide whether or not to turn it on.

### Bonus
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.

Thank you,

Hélène.
Reply all
Reply to author
Forward
0 new messages