Uses the Pires-Petitto Trebuchet Method! Requires ~10 columns and 0 additional rows!
Tutorial coming tomorrow—here’s a (soundless) sneak peak! For context, there’s one master list of items. I’m switching between two users that are linked via a “lead” email. The adding/removing of items from this master list is unique to these two users. Other users in the app have their own set of tools!
So I have a question. Maybe I missed something, but couldn’t you skip the temporary column altogether. So your template column would always contain the existing list of selected items already joined to the item in that row. When the action is executed, it slings the template over to the user sheet and automatically pulls in the updated list of selected items to your list sheet. Maybe I’m wrong, but the template column seems like an extra step.
Using this functionality, you can probably do a bulk award to user (if using relations/lookups to calculate balances). Hopefully one day we can do set columns and delete rows via multiple relation (@mark ). Then the Trebuchet method would take Glide apps to the next level!
heh, I smiled when I saw what you did with the if-then-else to handle the first item in the list. I had exactly the same challenge in my Global Announcement tracking demo. I solved it in a similar (but not identical) way:
Read By: Text column containing a comma separated list of User ID’s (my “items” list)
tp-first-user: Template containing the current User ID
tp-subsequent-users: Template containing the current contents of Read By, plus a comma, plus the current User ID
ite-new-read-by: if-then-else to determine which template column to use. If Read By is empty, use the first one. Else use the second one.
One thing I hadn’t figured out was a good way to remove items (users) from the list, so was particularly interested in what you did there. Very clever and will definitely be making use of that. Thanks!
Yes! I first used this method back in early December to develop my group chat template, but like you, I didn’t have a good way of removing users from a list. Then, in mid-January, @Lucas_Pires found out how to remove users using a user specific column followed by a join list. He dubbed this complete method the Trebuchet and the rest, as they say, is history!
Me neither! I think once the set column action came out, many of us tried to do something like this. I used the first half of this method back in Nov/Dec but couldn’t figure out how to remove items from an array. It wasn’t until I met with @Lucas_Pires did I learn that you don’t remove items from the existing array, but rather create a new array and overwrite. He’s the one who branded it the Trebuchet method. I thought it was catchy and branded it as such. But whatever you call it…zigzag, boomerang, trebuchet, array-column-overwriting…it’s an awesome method.