I’m trying to rewrite the template “sports team”. I want to have the top leader in every category to be shown in a list, with picture and name, e.g “Points per game”, “Assist per game” and so on.
You should also be able to click on “Points per game” and then get moved to another page with a list, of every players “Points per game” sorted from highest to lowest.
I want this to be dynamic, so when I change the stats in the main sheet, the list should change as well.
Main sheet contains all the players and all of their different stats.
@Darren_Murphy I have already watched this video. I want to create an app, that looks like the pictures. However, what I have created now is not dynamic. I have manually typed in the highest scorer, and when I click on “Rebound Per Game”, I get moved to the list over “Points Per Game”. How can I change this, so Glide automatically finds the top player in each category, and then shows their name and image. And then you can click on it, and see the full list over the category.
I can’t see you data, so I can’t tell you exactly how to do it, but in general…
For this, you could probably use a rollup->max to find the highest value, and then use that to create a single relation to the first player that has that value. (I say the first, because you could have multiple players that match the maximum, in which case the single relation would match the first one).
Once you have the above single relation in place, you would normally use lookup columns to obtain these values.
This should be a simple “Show Detail Screen” action targeted at the appropriate category.
@Darren_Murphy I tried the rollup method, and this is how it turned out. I can’t make a list out of “Max Points”, “Max Rebounds” and “Max Assist”, what am I doing wrong?
Let’s deal with one step at a time.
The first step is to find the Player with the Max Points, right?
Take your Max Points rollup column, and use that to create a single relation column. You want to match the Max Points (rollup) column with the Points per game column.
Then do the same for each of Max Rebounds and Max Assist.
As a side note, I would probably be creating these columns in a separate single row helper table, as that would make things a bit easier to work with. But it can still work this way, so that’s up to you.
You’ll need the names of each of your 3 players. For this, you’ll need 3 lookup columns. Each lookup column should take the Name via each respective single relation. Assuming you need their images, use the same method.
Once you have those, you can move to the layout view.
Start with a details screen, and make the source of the details screen the table you’ve been adding these columns to.
Then add 3 components to the screen. They can be any components, as long as you attach an action to them. For this use, a Title component might be a good choice, as you could include the player image, the category, and the max value. Each one of the components will be used for one of your 3 categories. So in each one, you could show the player name, and whatever the max value is for that category.
Now, each component will need an action that does Show New Screen->This Item.
This will give you 3 separate details screens, one for each of the categories. On each of them, you can add an inline list and configure according to the corresponding category.
Actually, @Alexander_Rubino - I just realised that you might still have a problem here. Because each inline list will be using the same table, you might not be able to configure them differently. So you might need a slightly modified approach. Let me just quickly test that.
No, ignore the above comment. The approach that I outlined will work.