Repeats and calculations inside nested repeats behaving differently in `ODK 1.27.3 vs 1.28.2`

1. What is the problem? Be very detailed.
I have developed a form and tested it using ODK 1.27.3 I then updated all tablets to 1.28.2 prior to field deployment all to realize the repeats and calculations inside them respond differently. I have nested repeats inside which I calculate several labels and recap values to help enumerators keep on their finger tips. In version 1.28.2 the label calculations work the first repeat and fails for the subsequent ones except the most inner repeat.

Example for quick debugging will be variable ${bmr_lbl} on Row 60 it would display fine for HIV_MAM_MALE but would only show --FEMALE upon next repeat. This doesn't happen with ODK 1.27.3 though

2. What app or server are you using and on what device and operating system? Include version numbers.

We use ONA alike managed server services

3. What you have you tried to fix the problem?

I downgraded ODK to last working version (1.27.3) but would still want to understand what is causing the issue in between

4. What steps can we take to reproduce the problem?
One can upload the form and download it to both the ODK 1.27.3 and 1.28.2 to see how they repeats responds differently

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

I am attaching the form and the control media files for testing

@lognaturel you've helped me in the past with similar complex forms and would really appreciate if you take a look and let me know what i might be doing wrong or if this is bug in which case I would revert to earlier version until fixed

Many thanks in advance
Jules R

--- XLSFrom and Media files are here attached ---
Digital_IFP_Filing_202010.xlsx (21.4 KB) getClosing.csv (16.1 KB) getFacility.csv (892 Bytes) getScreen.csv (465 Bytes) IFP_Closing.csv (9.1 KB)

Thanks very much for this detailed writeup and for including your form, @jules_rugwiro. I can confirm that there is a bug and that you should use v1.27.3 for now. I don't yet know what the scope of the issue is but I believe it is related to what @dmwanga reported at ODK Collect v1.28.2 regarding having to swipe more than once for certain constraints. @dmwanga if you could please share your form or a small form that shows the issue in that thread, that would be very helpful. Even just letting us know whether you only see this in repeats or not would be helpful.

I currently believe that this affects any calculation that refers to a calculation with a position call AND another field in a repeat. In @jules_rugwiro's form, that would be an expression like concat(${bmr_infection},'-',${bmr_nutrition},'-',${bmr_gender}) inside a repeat. The problem seems to be that this whole expression gets calculated too early before ${bmr_infection} and ${bmr_nutrition} have their values. It does eventually get fully computed and that's the behavior @dmwanga was noticing about being able to force computation by swiping back and then forward. Again, it would really helpful to get access to your form, @dmwanga.

Thanks @LN for this. I will share my form in a short while. I think that is part of what I was experiencing though mine is not in a repeat.

1 Like

5 posts were merged into an existing topic: ODK Collect v1.28.2

@jules_rugwiro We have just released Collect v1.28.3 which should fix this issue. Please give it a try and let us know. The good news is that the correct value was always eventually computed so although this was certainly annoying, it did not lead to bad data. We really appreciate the report!

2 Likes

@LN,

Thank you so very much. This version v.1.28.3 solves it all. I tested the form and works like charm.
I can't thank you enough, but just know the ODK team you are the Best

Cheers,
Jules R

1 Like