Hello, I'm currently working on an app for my programming teacher and am very close (I think?) to wrapping up the seasons and games section. The app is a soccer statistics app that allows you to create seasons where you can add games from a database to that particular season. What I'm struggling with is linking the code my teacher previously had that allowed him to document the actions of certain players for any particular game. The code that I created/stole is taken straight from the Ultimate Scorekeeper app and works as anticipated. Here is a screenshot to give you the general idea for the code in this part
Here is the remnants of the necessary code that I need to work into the part I've already manipulated to attach extra information to each game in the list of games.
If there is anyway I can make the tags and lists of these equal to each other to make it display information that would be great. I just don't understand the practicality of this and it's all well above my pay grade to be frank. If someone has any help to offer I would appreciate it tremendously! The aia file is also here if anyone is generous enough to take it straight on and try and help me out. I'm at my wits end and am extremely over this project. SoccerStatsAppPotentiallyFixedHalftime.aia (54.3 KB)
This variable, gameList has an unfortunate ambiguous name choice.
Is it a list of games, or is it a list of actions that occured within a single game or multiple games?
Worse, it is a table mixing two different types of rows describing different things (game vs event in game.)
If you need to store different categories of information, and if you plan on summarizing and filtering information for reports, save them in separate tables or add extra columns to your detail event tables identifying the game, game start, and half of each event.
This is called flattening a table.
You can also keep separate tables, appropriately named, like
games (identifying games and their start times)
game events (listing the events that occured within the game IDentifiers in column 1)
Investigate TinyDB NameSpaces as a way to use the power of different TinyDB instances.
I also question the use of a Notifier to choose the half (first/second) of new events.
If I understand the progression of time, all the events of the first half of a game happen before all thevents of the second half of a game, so there is no need to ask for the half over and over again.
Just leave it in a List Picker (lpkHalf) and set its .Text to the current half (first/second), for inclusion into new events when you click a Save Event button.
The data storage organization is too dissimilar to your teachers' table based setup to be of any value, aside from the idea of hiding and showing Arrangements instead of screens.
Here is a sample table based filter app you can study, with powerful value procedures you can call and string together in pipelines to collect and summarize data.
(Though your teacher already gave you nice custom made code for that in two list picker events.)
This is Alexander's teacher....he is such a great student and shared the link with me. Now that school has ended today trying to help finalize this for my upcoming high school season. What we are looking for:
Have seasons (2021, 2022) and so on for each season that I would have for our team. It all be saved locally so can be pulled up from the tablet or created as a report at end of each season in any format (that seems tougher)
Within each season would like the ability to have individual games in which stats can be tracked as the game happens. Would click each zone on the field as an event happens. For example player 1 shoots in zone 1 I would click zone 1 and record shot the player and shot from list pickers.
When the game is over I would like to take each stat and have it store only in the game so I can pull a report at the end per game of the season to see how we did as a team and each player individually.
If possible, I have also tried to add where I could get a season summary of stats per player. Player A had 4 goals, 12 shots, 4 giveways in 2021, etc.
The half is really only used (doesn't have to be) to see how we did each part of the game. At halftime I could tell players he is what we did in 1st half and at end of game could compare our improvement in shots allowed or goals scored kind of deal. Right now I do all this by hand with a few coaches.
We combined so much code I think it became really complicated and confusing for us to be honest. Just looking for some expert guidance in how to simplify and not over complicate like I did.
Any guidance or help in fixing would be a game changer! Hope this makes sense?
The data for this app fits into a single table with these columns, in major-minor order:
season
game
game team 1 name
game team 2 name
game start time
half
team of player doing action
action
action time
action zone (1-9)
action player
action points (+/-) - I don't know soccer, so this is a guess.
Each attribute of an action could be shown in a TextBox.Text, Label.Text , a ListPicker.Text (appropriately named), ready for use by the Click event of a Save Event button.
Saving the event would be accomplished by
retrieve TinyDB tag EVENTS (I assume one big table to allow stats across seasons)
(initially an empty list if not found)
add a row consisting of the aforementioned column values as items of a list
save the updated table under tag EVENTS.
Basically, this could be done as a spreadsheet or a SQL table.
I have table filters and a GROUPED_SUM procedure handy for reports, similar to SQL SUM Group By clauses...