Bugs when removing a repeated group that is not the last group

A few days ago, I found a bug when trying to remove instances of a "repeat group" with ODK Collect (v1.21.1). Searching for a solution, I quickly found this thread... and realised that I had already run into the exact same problem over 3 years ago, and even posted the above message about it! (Heck, I don't even remember creating this previous account!)

So, the bug is described in that original message and is still present in the current version of ODK Collect. In short, when a "repeat group" is defined with a "field-list" appearance to group several questions on the same screen, trying to remove a group that is not the last one does not remove that instance but the NEXT one.

My first intent was just to bump this thread and ask if anything could be done about it. In the meantime, I found a way to "fix" this bug, inspired by this post. By nesting a "begin group" within the "repeat group" and defining the "field-list" appearance on this "begin group" instead, removing a group then works as intended. Here is a test form illustrating both behaviours: Test_removing_group_with_field-list_V2.xlsx (16.8 KB)

Still, I'm wondering if the buggy behaviour could or should be fixed in the code. And if not, then a note of caution should probably be included in the documentation (I couldn't find any) to NOT use the "field-list" appearance for "repeat groups".

Any thoughts?

1 Like