Repeat within a repeat

I believe you may be hitting some of the various ‘issues’ with nested repeats, alas… :face_with_diagonal_mouth: Specifically, there appears to be an issue when the inner nested repeat has a relevance condition on it; see Weird behavior in nested repeats - #3 by LN - Support - ODK Forum , and an unresolved Enketo bug Editing submissions with non-relevant nodes removed from nested repeat causes error on computations of relevant data in subsequent instances · Issue #49 · enketo/enketo · GitHub

Also, adding additional (non-repeat) groups into the fray probably only complicated matters further… So what I did was remove these additional (superfluous?) groups, and removed the relevant condition on the inner repeat group, and instead just applied it against all the enclosed questions [the only diff if that you now see the repeat, but all the questions within it remain hidden…].

Please take a look at my changes and see if it behaves a bit better for you:

Repeat within Repeat Test copy.xlsx (12.3 KB)

I ran a few tests, and - if you ignore the empty nested repeat box when it doesn’t apply - it seems to be behaving a bit better. FYI I stripped out a bunch of unrelated stuff in your original form - just to try to reduce it to the bare minimum - so if this version is ok/adequate, then feel free to add things back in.

Unfortunately, whilst I fully understand the desire to make the inner repeat conditional, in your specific usecase, I dont know of another workaround - other than to instead make all the questions insider the inner conditional (and remove the relevant condition on the inner repeat itself, as I have done).

Please have a play around and report back! :slightly_smiling_face: