Hi folks,
I think I’m missing a basic concept or two, hence my confusion. Here’s what I’m trying to do:
I have an app that has Things - and each Thing can have multiple Attachments. Things and Attachment exist in my app in seperate tables.
I’m using Row Owners (email) on both tables. That all works fine.
I now want to make it so that a Thing can be owned by more than one person (ie it becomes a ‘shared’ Thing). When I do that, all the linked Attachments against that Thing should also become shared.
I’ve therefore created an additional column called ‘Shared User’ in the Thing table. I made that a Row Owner column, and again that works ok.
However the issue comes with the Attachments. What’s the best way to make it so that all the linked Attachments can also be viewed by the Shared User?
My first thought was to create a matching Shared User column as a 2nd Row Owner on the Attachments table - then essentially force the email address entered into the Shared User field into the same Shared User field on the Attachments table. But:
-
That feels really clunky as there could be hundreds of Attachments for each Thing which would need to be updated every time a Shared User is added or edited.
-
I actually don’t even know how to do that in Glide I realized!
I feel like I’m missing something! Appreciate any help!
It is actually the way to do it in Glide right now.
You could use “basic array” column but it is only available on Google Sheet. Hope it will be available on Glide Table one day.
You are doing it the right way.
What exactly you can’t do?
@MaximeBaker thank you so much for your support!
Good to hear I’m along the right lines, even if it’s not what I expected!
To illustrate my next challenge here’s an example of what I was thinking to do:
If a Thing becomes shared, but that Thing already has several Attachments: What would be the best way to add the email of the Shared User to every single Attachment (so that it becomes the second Row Owner)? I was initially thinking to do a Workflow and use a Relation column in the Thing table, with the ‘Match Multiple’ option selected. This works to populate all linked Attachments. However when ‘Match multiple’ is selected, this column is then not available in the Set Column Value action in a workflow.
I guess I should be taking a different approach to find the 1:many relationships and set them with the corresponding Shared User ID?
Thanks again!
You could use a workflow, where you loop through a filtered list of rows, applying the update to each row as you go. Depending on how many rows there are, that could be very slow. A much better (and faster) way to do it would be to use the Glide API.