I think what might not be clear in those guides is that the columns have to be structured with sequential numbering in a Google Sheet. It’s a very specific method.
There is a reason that you can’t assign row owners to a column the way you are trying to do it. In glide, any computed column is actually computed on the end user’s device. What that means in respect to row owners is that your row owners would not be able to be verified until AFTER all data is sent to the user’s device, where the array is then computed, and then row owners can be checked. Obviously, if you have already sent all data to the device, then row owner security is not really applicable since it’s too late and security has been compromised.
The only type of array that can have row owners applied is one that is build using the sequential numbering method. This is a bit of a hack method, and the array is actually computed server side instead of client side. For that reason, you can apply row owners to that type of array.
I think a better way in your case would be to just apply row owners to two separate single value columns. Then you don’t have to mess with making an array, and it will work as expected.
This makes 100% complete sense, thanks for explaining that!
I really, really wish the multiple guides on this topic mentioned that - since that’s a big limitation that I couldn’t have possible figured out myself.
For your solution, is there a great way to make default-values in Glide? For example in airtable I can have plain-text columns have a default value such as ‘Admin’. But I have a few tables in Glide that are being fed data from an API from stripe, so I’d love to make those new rows have the default row owners be the users email + “admin”.
Thanks so much again! I’ve been trying to figure this out for hours. Should’ve posted here first.
Yes! I saw that post, but admittedly it’s still not clear for me on the Stripe API → Pushing details into a new row (let’s say in a Stripe glide table). Ideally there would be a column where every new entry just had the text “Admin”.
I guess I could use something like Zapier in-between to add that, but would love if I could do this natively in Glide. Having a welcome screen with hidden values won’t work in this scenario, as there will be multiple purchases made that aren’t tied to a user logging in.
Basically you just need two columns. One to hold the user’s email, and one to hold the Admin role value. Both columns can be row owner columns.
I’m not sure if you need an admin row owner in the user profile. If so, you would probably need an onboarding process where the user performs an action that. That action would write ‘Admin’ to the admin row owner column.
For any other table, you just need to set the value when adding a row. There are several ways to achieve that, but one way would be to have a template column in the user profile table that is simply filled with the word ‘Admin’. This column is just to hold the text and wouldn’t serve any other process. Then when adding a row, you can pull that ‘Admin’ value from the user profile and write it to any other table when adding a row. You would write it to a column that is the Admin Row Owner column.
How would that work with data being pulled into a glide sheet from an API? So for example each time someone makes a purchase through Stripe, it feeds into a Glide sheet into a new row. But most of these purchases aren’t tied to a user in my tables.
So when it comes in, it wouldn’t have any relation to a user… so it wouldn’t have anything to pull-in from that template column. So the purchases made that are connected to users’ emails would be hidden, but the rest wouldn’t.
I think the answer to my question is to just hard-code it into the API request, which is easy enough. But good to know on the limitations and workarounds needed to make this all work.
Ah, I didn’t know that was the case. I thought you were creating the rows in glide.
So, yeah, I’m not sure how you have it set up to feed stripe data into glide, but I think you have the right idea to just make it part of the API request. Fill one column with the email address, and fill another column with the word ‘Admin’. Then you should be good to go.