Control repeat count

I designed a form with a repeat group on households and household participants in a study. I created a 'number of participants' field.
When I enter the number of people, for example 3, I have the forms of 3 participants. But when I decrease the number of participants to 2, the third form still remains active.
Need your help!

The problem is solved using the position (..) function. Thanks!

1 Like