I’m trying to create an app for a local sports club that helps build a match schedule. I’m stuck in generating a match schedule between the teams in the competition. Is there a way with Adalo to create a list of matches?
Put simply
User creates a competition (say men’s 18-25)
User adds teams to competition (say 6 teams play)
App creates tournament schedule and provide to user → here is where i’m stuck
Ok, so you’re able to have the user add teams to the competition.
We have X number of teams and we have to match them up and create the schedule. So the idea would be to create a “Match” (a match being like 1v1). Create a new collection called “Matches” and create relationships for Teams and Competitions. Teams can have many matches and matches can have many teams. Competition can have many matches but matches belong to 1 competition. Add a number parameter and call it “Match Number”
After the teams have been added to the competition, link to a new screen and call it “Creating Matches”.
Add an input component, label it “Matches Input” and set the default value to custom formula. Inside the custom formula, place “Current Competition > Teams > Count” divided by 2. This will be the formula to know how many matches need to be created.
Add a countdown timer and set the action to “Create > Match”. Set the competition and the match number. Link to a new screen and call it “Matching Teams”. Set this countdown to sometimes visible if “Current competition matches count” is less than “Matches Input”.
Add another countdown timer and set the action to link to a new screen called “Schedule”. Set this countdown to sometimes visible if current competition matches count is equal to matches input.
On the “Matching Teams” screen, add countdown timer and click the settings > then make a list from the countdown timer. Set the list to Teams > current competition teams where current team matches count is equal to 0. Set the maximum number of items to 2.
Go into the countdown timer settings and add an action to update the current match to add the current team. Then add an action to link back and add a condition where the action only happens if the current match teams count is equal to 2.