Dynamic Repeat Group does not work properly if the number of repetitions is updated

1. What is the problem? Be very detailed.
When I update the number of iterations of a dynamic repeating group, the number of repetitions in the group only changes if the updated number is higher than the one previously entered. Otherwise, the number of iterations remains fixed at the highest value previously entered.

2. What app or server are you using and on what device and operating system? Include version numbers.
Server: KoboToolbox (2020-06-27)
App: ODK Collect v1.27.2

4. What steps can we take to reproduce the problem?
Create a XLSform with a integer input and a dynamic repeat group based on this integer. Run it with a X number of repetitions, go back and change the number of repetitions to a value < X. Finally, check the dynamic repeat group once again.

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
You can check it through this XLSform: repgroup-test.xlsx (10.4 KB)

Hi @nnsdtr_github
This is a known behavior:


If the count is decreased by a user, no groups will be deleted. This avoids accidental data loss: a user who accidentally sets the count too low can set it to a higher number and still have the repetitions that were previously created.

There is also a recommended workaround: https://docs.getodk.org/form-repeats/#id6