Row Owners vs. Filters

Hi, I have read several posts about this but they skirt around the actual issue I need to know about.

In SQL, if you do a query, the result set is only the records you specified. I was thinking of filters that way as well. But I saw one post that alluded to the fact that ALL records are sent to the local device if Row Owners is not implemented.

Is the filtering done on server-side or on client-side?

I also saw another post that alluded to setting up an email array and using that array as “row owner”, but it did not tell how to do that.

As far as filters are concerned, everything is done client side. About the only client/server interaction is to synchronize data changes between glide’s copy of the database and the client’s copy of the database.

Row Owners are a security feature which restricts which data is sent to the client in the first place.

Row owners need to be basic columns. You can’t use computed columns because computed columns are computed only on the user’s device after the data has been synchronized to them. At that point, data security is a moot point if you wanted to apply row owners to computed columns. The only loophole is to create an array via a google sheet, because a sheet array is not computed data. It’s still basic static data, so you can apply row owners to an array column generated from sequentially numbered Google sheet columns.

3 Likes

So, I had a “share with” column where they could enter comma-delimited email addresses. I was using a filter. I’ve now set up an “Owner” array in my Google Sheet. Is there any way to “split” the one field into the Glide “Owner” array, or would that be considered a computed column?

Also, I have an “Owner 1” column, and it appears that the contents are in my “Owner” array in glide, but the “Owner 1” column is missing in the glide editor – no way to change it… It was not specified as a row owner column.

image
image

And it’s weird that only the first two “owners” are listed in the owner array (I expanded the column all the way)…

image

I am really not understanding how the Glide editor uses these Google Sheet “arrays”. I removed the “owner 1, owner 2”, etc. and added “row owner 1, row owner 2”, and now I see the array, but none of the individual columns are available in the Glide editor to modify. They can only be modified in the Google Sheet.

So is there not a way for the user to modify rows 2-n if I desire to allow that?

Hmmm, and I can see them as selectable when I add an Text Entry component, but since I cannot modify them in the data editor, I cannot change their “type” to “email”.

image

Same when I rename them to “Owner 1, Owner 2”, I can no longer modify them in the Glide data editor, only in the Google Sheet. The good news is they seem to work as “row owner” in the way expected, but I really need to edit them in the glide editor as well as the google sheet…

image

It wasn’t working with your first setup because you have two “Owner 2” columns here.

As long as you put “Owner 1”, “Owner 2”, “Owner 3” etc next to each other in the sheet then you should have an array.

If I recall right, you’re correct that there’s no way to modify it using the data view, but if you want your users to modify it, you can just add email entry columns in the edit screen of each row. You can reference each field individually there.

2 Likes

Yes, I did notice that. My question then, is can I have them enter the values comma-delimited in one field and “explode” it out into the array instead of having 5 or 6 different entry fields?

Did you add Row Owner 4 through 9 via the Glide Data Editor?
The reason they are not the correct type is most likely because they are not part of a single contiguous block of columns, and so Glide doesn’t consider them part of the array. To fix that, you’d need to head over to the Google Sheet and rearrange them.

There are two criteria for creating an array column in Glide:

  • Columns must be named sequentially (Col 1, Col 2, Col 3, etc)
  • All columns in the array must be in a single contiguous block, with no other intervening columns
3 Likes

That’s an interesting challenge.
I think it would be possible if you were using a custom form and capturing the list in a user specific column. You could use a split text column to turn the list into an array, extract each array item using single value columns, and then use those in a set column values action. The number of array items/single value columns would need to be “hard coded”, so it would be a bit kludgy. But maybe not too bad for this use case.

If you were using a native form, then I think the only option would be to manipulate the data in the Google Sheet, using a bit of apps script or an arrayformula.

Edit: Actually a 3rd option that just occurred to me would be to trigger a webhook to Integromat, and then have Integromat update the individual columns.

2 Likes

Thanks,

I found they were not the correct type because they had no data in them. Once I added email addresses to the first row, they were found to be the correct type. They were contiguous.

1 Like

I guess it’s not worth the time for a custom form. This particular app feature is for the benefit of the end-user, and I think it will be probably actually used by very few people. I’m the only one that uses it right now! :slight_smile:

Actually, the first option that I described (split text/single values/set column values) might work as an On Submit action with a native form. Not something I’ve tried, so I can’t say for sure. But probably worth a try.

1 Like

Thanks. I’ll try it after I get rid of some of the glitches I introduced by having to make true row owners instead of filters (and moving to a google sheet at the same time). I’ve made too many changes in two days! LOL!

One alternative for you is let users update a Sheet column with a comma-delimited list of emails, then:

  • Use an arrayformula to split that column into multiple columns.
  • Use another formula to sequentially name those columns (Row owner 1, Row owner 2, etc.)

I can provide you the formula for those. I have done this before.

2 Likes

Thank you, @ThinhDinh … Are those google formulas or Glide formulas? I anticipate your reply. And I love to learn, so provide in either case.

Those will be Sheet formulas, since I assume you’re storing these in the Sheets.

1 Like

OK. I don’t know much about sheets, but I’ll be willing to give them a try.

He means Google sheets. This might help with the terminology.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.