Enketo: reference in label used inside repeat is not recomputed

1. What is the problem? Be very detailed.
Calcullate does not recalculate in repeat groups. The values from the first iteration are kept.
2. What app or server are you using and on what device and operating system? Include version numbers.


Enketo
3. What you have you tried to fix the problem?
I have tried to change the order of calculate and begin repeat
4. What steps can we take to reproduce the problem?
Please find the following for illustration:

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

1 Like

Thanks for reporting this, and for the test form! I've filed it here to reproduce, fix and track: https://github.com/enketo/enketo-core/issues/719

1 Like

In case anyone else wonders, I've confirmed that ODK Collect performs the expected recomputation.

1 Like

This turned out to be a known pyxform issue with <output> syntax (so the XForm itself is incorrect). Calculations are performed correctly (as desired) in the background in Enketo.

If you're able to upload a manually edited XForm, these are the corrections required to change all incorrect output value references within the repeat to correct relative references:

<output value="../type_antimalarial_drug " />
<output value="../antimalarial_stockout_d " />
<output value="../type_antimalarial_drug " />

I believe this means Enketo no longer has the patch to contextualize absolute references within repeats, right, @martijnr? What Enketo version was that released with and when did it go out?

1 Like

Yes, that's right (it still has that position-injection support but only for forms generated with older pyxform versions). The new-spec-conforming behavior was added in Enketo Express 1.85.0.

1 Like