Give new person in detached repeat the next number

I’m not sure if I understand the requirement correctly but I just want to make sure the functionality of the computation is clear. The Computation would work like this.

Starting with this data, the person numbers are from 1 to 4.

Person Number Name
1 Aaron
2 Beate
3 Caroline
4 David

Remove Caroline and recompute the values. The person numbers are re-computed and go from 1 to 3. See Intermediary repeatable group instances when adding field instances for more information on why there aren’t any gaps.

Person Number Name
1 Aaron
2 Beate
3 David

Re-add Caroline.

Person Number Name
1 Aaron
2 Beate
3 David
4 Caroline