Hello @Grzesiek2010,
Thanks for your prompt answer.
We have a lot of problems to get more complex usage of repeats working, and a big problem is that the behavior (at the moment) is very different between (KoBo)Collect and Enketo(Preview) and even between pages and default style setting. Allow me, please, to come back with a "real" more complex example in the next days, probably as new topic.
Also the documentation and forum discussion gave a lot of simple examples, like count(RepeatGroup) and referencing this for a following repeat group with repeat_count which will not work well if repeat_count is reduced are deleted.
My feeling is that the behavior also was in Collect since last year. But I am not sure. Maybe also this hint was new? https://docs.getodk.org/form-repeats/#using-a-constraint-to-limit-repetitions
I think, that now an additional internal grouping with relevant is needed ALWAYS to avoid problems. At least for Collect!
I copy @LN in, for further discussions.
The differences between Collect and Enketo create general problems for us, as during monitoring/QA we sometimes need to re-edit a few cases on the server. And this may destroy even some field data.
Kind regards