I am trying to create a very simple app to figure this tool out. So far it is very easy to use and understand but… I am hitting my head against the wall with one feature. Essentially I want to have a list of users and a list of available badges they can earn. When building the app, I can’t figure out how to select the badge independently. IE: When a user selects a badge, that badge is now selected for everyone. I created a boolean column in my badges table and made sure it was created with “Column is user-specific” as well as created a column for Row ID. I have watched some YouTube videos, googled etc.. I can’t figure it out. Any help is appreciated.
If you use user specific column, other users won’t see the user selection.
You could use a column in the users table to set the badge on user’s row as a basic column.
Can you show us your data structure? How are you allowing each user to select the badge?
Essentially I want each user to click a check box/button when they earn a badge. Each user can collect all badges independently of others. In other words it’s a competition to see who can collect more or all of the badges. Hope that helps to understand what I am trying to accomplish.
I have a question for you. Do users need to be able to see which badges other users have earned?
Yes, it is a competition.
Okay, in that case I would suggest a separate table for “User Badges”.
In that table, you can have the following columns:
- UserID (RowID from Users table)
- BadgeID (RowID from Badges table)
- Date Earned (if desired)
I’ll assume that you have a screen that contains a collection that lists all your badges. Clicking on a collection item will by default take you to the details screen for that item (Badge). On that screen you can add a button that users can click to indicate they have earned that badge. On that button, you should configure an Add Row action, targeting the User Badges table, and populating each of the 3 columns:
- UserID is a user profile column
- BadgeID is a screen column
- Date Earned is the current date/time
To get a list of badges that each user has earned, add a multiple relation column in your Users table that matches the UserID (RowID) with the UserID column in the User Badges table, then use that column as the source of a collection on your User details screen.
To get a list of users that have earned each badge, add a similar column in your Badges table, this time matching BatchID (RowID) with BadgeID.
This is a great help. One initial question though. How do I get the UserID & BadgeID from the Users and Badges table into the new User Badges table?
You do that as part of the Add Row action. Both are special values that you can access directly. But you must do it from the context of the Badges details screen.