Repeating Group with multiple types

I am creating a sports team app and am stuck in my efforts to make team creation user friendly.

The use case is simply allowing a coach to add players to their team. But I want the app to control the number of players and sequence the player’s position number based on the sport from my master data sports table that contains number of players for each sport. I could have the coach do it manually but that would be very user unfriendly.

So if the coach is adding players to their soccer team, they will add 11 starters plus 3 subs.
But if the coach is of a rugby team, they will add 15 starters plus 7 subs.
Within the repeating group I want an auto generated text field that auto sequences and is limited to the number of players based on the sports table. But the content source of the repeating group is my master data player table.

Thanks for any help in advance.