Problem when deleting an Index, in the repeating group

I am putting together a questionnaire, which collects the holder’s data and, if he has dependents, generates a repetition loop for the number of dependents. If it doesn’t have any, skip that repeat group. Using Enketo it works normally, but using Kobotoobox on Android I can reset the add, but I can’t reduce it, if I add 3 dependents and due to an error I try to change to 2, it keeps asking for the 3. I don’t know how to solve this problem
CADASTRO DAS FAMILIAS (1).xlsx (65.5 KB)
Lines 36 to 39

Maybe, have a look here: Filling out Forms with Collect - ODK Docs.

Unfortunately this option does not appear. And I would like it to be possible to exclude them automatically when the number of dependents decreases!

Sorry, you cannot configure this standard UI element of the system.

Could you share a screenshot of the issue (navigation menu!) and the related part of your form, please?

1 Like



The value 2 was entered and moved forward, if I go back and enter 1, I will always have 2 items, and the second one does not delete even in the app interface.

Can you, please, share a related extract as XLSForm (.xlsx file). Do a successful test with the Online validator for the extract before, please.

1 Like

Eu enviei o arquivo XLSX no primeiro post.

aDXTVtnYNdZdf48NaEXoB3.xlsx (13.5 KB)
st.

Sorry, to let you better understand what I mean with a reduced extract, which facilitate to focus on the issue, please, have a look as this one and add if something is missing for the problem.
Cadastro_Familias_02.xlsx (10.0 KB).

That’s it, if you look at line 4 there is the entry of the number of repetitions, this value is used in the relevant “${Quant_Pessoas_Comp_Familiar} >= 1” so that if the value is Zero it skips the repetition loop and if it is another value it repeats the specified amount that is described in “repeat_count” . Until then everything goes perfectly, the problem is that if I enter the value 2 for example in the field on line 4 and move forward it creates two repetitions, but if a typing error occurs and I return and enter the value 1 the loop continues with 2 repetitions and even in the program interface the option to delete does not appear, forcing the person to fill in the information. My doubt is how to solve this problem.

what would be the solution?

You can try the following, please:

  • Pack the whole content inside the repeat in a group with a relevant clause position(…) <=
    ${RepeatCountVar}.

See ODK documentation, please Form Logic - ODK Docs.

Are you using Collect or Enketo?

1 Like

I use both, in the Android apps I use ODKCollect and that’s where the error occurs. On Enketo it works normally.

Can you share a short extract of your form in XLSForm format, please, to test/reproduce the issue?

1 Like

CADASTRO DAS FAMILIAS.xlsx (72.0 KB)

Could you test this already, please?

1 Like