Hi, I’m trying to create a leaderboard for a workout tracking app I’ve created.
Each user records their own data to track their progress for each workout type using user-specific columns. Is there a way to take the user-specific values and insert them into the corresponding user’s profile?
Or is there a different way to create a leaderboard with this type of setup?
Presumably you have an action that sets the User Specific Values. If you create a single relation between the table you’re working with and your User Profiles table, then that same action could also set a corresponding value in the User Profile.
The below demonstrates a technique for “rolling up” User Specific columns. It might give you some ideas.
Okay, so I think I figured it out with the help of another friend. I created another user-specific column to capture the user email address upon the submission of the action. Then I made a relation based upon the email address and then did a rollup to calculate the total points.
I’ve run into one more issue… I was able to capture the email address for one table because it uses a button with an action. However, on the other table, it’s a boolean value that’s updated by using a checklist. It stores “true” or “false” in a user specific column. Is there any way to capture something like the user email when they are just checking a box on a checklist? Or would I need to change those to buttons and is there any clean way to display that similar to a checklist?
Also, once I’ve calculated the total points for each user, I’m having trouble using the user-specific points to sort the inline list in descending order. It appears to only be “seeing” the current user’s point total. My current workaround is to have a button below the leaderboard that says “Update My Position”. It has an action linked to it that writes the user-specific point total to a generic column in the user tab for total points. I’m able to sort the inline list by that column.