Hey everyone,
I currently am building a web app for my friends and I but I am stuck with particular problem.
Feature summary
The ability to create a league that has a list of users and teams. The total number of teams owner by each user will be configured by the current user.
e.g I create a new league that has 4 users and 2 teams per user. The will result is a league with 8 teams with 2 teams owned by each user.
Problem context
I have 4 data types
User = top level users of the application
League = database of leagues linked to users and league.teams.
League.Teams = database of teams linked to a league, user and team.
Team = database of teams
- The current user creates a new new thing (league).
- The current user selects an integer value for the total Users and League.Teams (4 users, 2 league.teams).
- The current user searches for users via a Searchbox and selects the users to be displayed in a repeater group. A total of 4 users have been selected and then the thing (league) is changed to include the list of users.
- The users selected have had the League added to their list of Leagues field in the user database
- This is the step I am stuck at. The current user now needs to select League.Teams per user based upon the integer configured previously.
For step 5, In the UI I want to display a repeating group of the list of users with another repeating group inside for the list of League.Teams per user. For this to happen, I need to create all the League.Teams per user entries in preparation to populate the repeating group. In this case it would a total of 8 entries (2 teams per user). The League.Teams repeating group will include a Searchbox returning Teams for the current user to select. After the teams have all been selected, I will then make changes to the Team field per entry in the League.Team database. This last step i cannot seem to workout.
Any help will be much appreciated. If my current approach is not the best pathway, I am open to hearing other solutions.
Thanks