Repeat group if condition is met - how to add / delete groups?

1. What is the problem?
I am using a form that has this feature: https://docs.getodk.org/form-logic/#repeating-as-long-as-a-condition-is-met

My use-case is that I don't know in advance how many repeats are needed and the enumerator may not know when they start the form and I've had lots of questions over the years about 'Add group' so wanted to avoid using this method...

I have just noticed that the jump menu does not show the symbols for add / remove a repeat. It appears that I can only navigate up, so in order to add another repeat I need to go to the end of the form, move back a question (Are there any more...) then select Yes. This is even more clumsy than the pop up!

I can't find a way of deleting a repeat in this form either.

This is not what I expected, but is it a consequence of using this method to avoid the 'Add group?' pop up?

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

3. What you have you tried to fix the problem?
Looked in the documentation for any indication that these features might not be compatible

4. What steps can we take to reproduce the problem?
Create a form using the example in the docs.

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
This is what it looks like in the jump menu screen... I am used to seeing a + button and the 'bin' to delete repeated groups.

Hello @seewhy,

If you (i) want to avoid having the pop-up, (ii) don't know the minimum repeats, but (iii) know the max repetitios, I would suggest you try the following:

  1. Set repeat-count() to the max you know
  2. Wrap all questions in your repeat inside a group (to easily control via one relevant
  3. Add a control question ${ctrl} as select_one yesno (1 or 0)
  4. Set relevancy for the wrapping group as if(position(..)=1,true, if(indexed-repeat(${ctrl},${rpt},position(..)-1 = 1, true, false))

This shall run as desired behind scene with a caveat that the data export will have all the unused space holders. Easy to clean I suppose

Hoping this solves the issue or at least expands the list of options to explore

Best,
Jules R

Hi @jules_rugwiro
Thanks for this suggestion. I can see the logic and value of this suggestion. I suspect in my case most respondents would need 5 or 6 repeats, but there could be as many as 50 in one or two responses - which is why I went with this documented version... I'm told I'm not very good at cleaning :slight_smile:

But definitely a useful option in other circumstances.
Kind regards
CY