I’ve been reading up on the best way to have publicly visible meta data about user-specific data.
In my app I have a table with 100s of Users and then I have another table with 1000s of rows of Items. When I started, I wanted to give user to track a subset of Items as a “My List” type of feature. To do that, I used a user-specific column and a toggle in the UI to add or remove the Item for the user’s “My List”. Then I have a page for them to view their “My List” which is simply a collection filtered on the value of the user-specific column.
The good news is that many users have used that feature. The bad news is that I am realizing how limiting that implementation is now that I want to add/enhance the UX. At a very basic level, I want all users to see the number of users that have a particular item in their “My List”. I am seeing now that using the Trebuchet Method demonstrated by Robert elsewhere is the right way to go.
My question now is what is the best way to navigate the transition from what I currently have to what I need? I’ve been exploring ways to have users click a button somewhere in the app that would write their “My List” data to an interim table and from there I can implement the Trebuchet Method going forward.
But, I am pretty stuck thinking through this and would really appreciate insight and guidance from the community! Thank you.
My only thought would be to build an action somewhere in your flow that would write a Joined List of user selected items to the user profile row, or something like that. So if there is a common button or something that the user clicks on, it could keep overwriting the value in the user profile table until all users values are filled.
I think this topic is related to my need so replying here.
I am successfully using the updated trebuchet method (thanks Bob) to update “favorites” - e.g. using set column action to add the current item to the logged in user’s email.
What I am hoping to use trebuchet now for is for an admin to assign items to user(s) from a user choice list rather than the current user assigning items to themselves.
When the admin is viewing the item to assign, I need a way to select the user that I want to assign the item to and have the assigned multiple file column (in my users table) include the newly assigned item.
I think I need some kind of temporary column that captures the user Id that I select from the choice component - then the set column action assigns the item to that user Id?
Correct. You’ll want a user specific column in the items table. Admin will write an email address let’s say to that column using a choice component perhaps. Relation column from that user specific column to the user table. Then the trebuchet set column value actions will be routed through that relation.
Bob - thanks for the tip on the user specific column in the items table.
I have used a checklist users collection that writes to a user specific tempemail column in my items list. 1 or more email addresses are written to that column based on the number of checks in the choice component. all good
I created a relation from the tempemail column to the users > email.
this works for one email but not multiple.
Where things go south is using the relation column in the set action. I don’t see the relation listed in the set column values menu. I only see user profile > user profile row. this makes all the updates to MY row as opposed to the selected users.
A comma delimited list is not enough to establish a relation because ‘A,B,C’ is not an exact text match to ‘A’. What you need a Split Text column to convert it to an array first, because ‘A’ ‘B’ ‘C’ does contain a match to ‘A’.
You can only Set Column values on a single row, so your relation needs to be a single relation instead of a multiple relation.
THANK YOU. As with so many things in Glide I feel like the answer is hiding in the shadows - so your flashlight and willingness to help is much appreciated.
I’ve seen the single/multiple relation mention many times in the community so now i see it “in action”… cool.
So I am honing in on the functionality I need. Namely, select one or more users I want to assign an item to.
What I can do now is to update my user specific email column with any student I select in the collection relation. cool.
As far as using my trebuchet columns though the assign/remove button block only appears when a single user is selected as I show in the screenshots. i think this is related to the single/multiple relation column issue.
I am hopeful that I don’t need to select one user at a time and hit add each time.
Before we get too far…are you attempting to update multiple rows with one set column action, or are you attempting to update one row with multiple selected values? Can you show some additional things, like how the button actions are set up and how you relation is set up?
My initial thoughts is that you still aren’t using a Split Text column like I mentioned here:
But reading more, I’m a little confused on your end goal and fear that you are expecting to be a me to update multiple rows with one set column action.
Thanks for the additional questions. I have the split array working well.
the goal is to assign the current item screen to one or more users.
my hunch is that i don’t need to use the trebuchet method to do this as I need to assign multiple user rows to have the assigned item. So the action buttons don’t serve any useful function since i can simply use the relation to the user to assign the item to 1 or more of the users.
I am going to disable the action buttons and give this a try.
Thanks for the info that its not possible to update more than a single rown (doh) with the set column!
Yeah, I think the choice component, a non user specific column to store the selections, and a Split Text column to convert the choices into an array is all you really need. Then a relation in either the user table, item table, or both. That should be about it.
Because of your guidance I have made a lot of progress.
Here’s the final mile of my journey.
I have the following tables:
users
to do lists
items
users can have multiple to do lists
to do lists can can multiple items
multiple items can be assigned to each user
I’d like to combine both the items that a user has been assigned as well as the items that are tucked away inside the users’ various todo lists. It’s like a need a relation to a relation. is this possible?
I can easily list the assigned items but i now have to open each todo list to see the items inside. Would be cool to combine these into all items associated to a user.
there is likely a simple way to combine lists but I’m still a noob…