I have allocated the Main Column to roles on the user profile page. And set email and the secondary as row owners which seems to work. The next stage is where i keep getting confused.
The app has a number of productions - with rowiID.
A user is assigned a default Production - Which is stored in the User Profile under default/production ID, which is used to populate forms and such for reports and incident logs. What i would like to achieve is the User (not Admin) can only see the records for the Default/Production ID and also not download that data for security between productions. The admin is the one that assigns default to Users - best case is a way to assign multiple productions for access - but ill take one for now. There are some tables which are communal for all productions such as contacts, venues which i donāt want to row owner filter in any way.
What do i need to add to each record or table to achieve this. Or is this not what row owners is for and iām really confused - and just need to use filtering from that point.
HI Mazen,
Thanks, I did watch the, a few times. I am not sure if i am just trying to add multiple row owners and heading down a wrong path, as all the examples tend to be using email, which i donāt want to use as its not one row owner on a row, its a production team who need to be able to see the records.
And amazing how far glide has come and looks so different in so many videos on youtube.
Cheers
In order for this to work, you would need to configure the Production ID column in your Users table as the Role column, and then apply Row Owners to the RowID column in your Productions table.
Thanks Darren for the help. Really appreciated of your response and the amount you do on forum, read many replies of yours so far.
That works to get the Users to see the Productions they are assigned - but i seemed to have lost the Admin now, and also is there a way to have multiple assigned productions in a cell - it seems once its a text field with multiple rowIDs embeded, it stops working - since i can not do a calc field, i can not split etc.
Current Setup - Roles - ProductionID column in users, Row Owners, Email and Secondary (Column).
On Reports tab i have the ProductionID column as Row Owner and a new Column (Admin) - filled with Admin in each row,
I think your only options for Multiple Roles are to use a Multiple Texts column (need to enable it in previews), or use the old trick with a google sheet where you can consecutively number columns and they become an array. I would only suggest the google sheet trick if you are already using google sheets for your user table. Otherwise Iād stick with the Multiple Texts method.
Thereās a couple problems though with using a Multiple Texts column. One is that you canāt directly type into an array type column. The other is that you cannot change a user role directly from the app. You need to do it from the data editor in the builder, through the API, or through a server side workflow. Iād probably recommend the workflow option (any of them other than the app interaction workflow which runs client side). Essentially you would need to create some sort of array in your user table that contains all of the user Productions and Admin when applicable. Then the workflow would need to be triggered to copy that array into the Multiple Texts column. The Multiple Texts column would become your Role column.
Iāve experimented with the Multiple Texts column when using it for Row Owners which worked well, but I have never used it for a Role column in the user table so Iām only assuming that the above would work. Maybe someone else has already done it and confirmed, but I think this might be your best bet to get this to work.
I use google sheets because I have multiple row owner columns in many tables to control access to most rows in the App - up to six different roles: Role1, Role2, Role3 etc. When I add a row I assign the roles based on inheritance from the user who creates it.
I see how I can use Multiple Files to create a āRolesā column in a Glide Table (running a workflow every time I add a new user or change a users role access).
For the tables that I currently have ROW OWNERS set (to specific columns), is there any reason to āmergeā them into a Multiple File type? If I read this right you aggregated multiple Row Owner columns into a single Multiple File column when adding a row. Is this correct and was there a benefit versus keeping the RO columns separate?
In the end I would like to have the USER table as a Glide Table versus Google sheet without re-writing every table/workflows that uses ROW OWNERs.
This current setup would not be a reason to force you to rely on google sheets for your use case. You can already assign multiple columns as row owner columns. They donāt have to all be in an array.
Just to make sure I understandā¦are you talking about using roles in a row owner column or the actual Role column in the user profile? You can put whatever you want in a row owner column without having to rely on server side processes or workflows. The actual Role column in the user profile is a different story, because for security reasons itās much harder to assign or change a users Role (changing a role has to happen server side via data editor, API, or server side workflow)
For Row Owners, I think the biggest benefit of using a Multiple Texts column is that you arenāt restricted on the number of row owners for a row. Whereas with individual row owner columns, you are restricted by the number of columns that you have. You can assign as many columns as you want as row owner columns, but you still have to make changes in the builder every time you need to add another one. With the Multiple Texts column as a row owner column, you can have as many row owners as you want with only a single column.
If the number of row owner columns rarely changes, then there probably isnāt much of a benefit because itās a bit more complex to get values into a Multiple Texts column.
Again, just want to make sure we are not mixing up Roles and Row Owners. To assign multiple Roles to a user in the user table, your options are the google sheet array trick or the Multiple Texts column and thatās it. As for Row Owners in all other tables, you can either have multiple individual row owner columns or use a single Multiple Texts column. Assigning Row Owners is easy regardless if the column contains an email or a role value. Assigning a Role to a user is a whole different story.
I have multiple Roles for a user. Rows have multiple Row Owners as columns which match a row value.
Currently I use google sheets [Role1, Role2ā¦] to create the multiple Roles for a given user. Updating a Role means updating the google sheet and waiting for Glide to propagate the update.
Is there any reason to use Google as a User table anymore?
What are the benefits of using a single Multiple File column as a Row Owner versus multiple basic columns from your perspective? You mentioned Row Owner columns which I think means Glideās restriction of 9 but not sure.
(Iāll pre-empt this by saying Iāve only tested Multiple Texts when using it for Row Owners. I have not tested it when using it for Roles, but if I recall correctly, it should work.)
Technically no, there is no reason to rely on google sheets for your use case of applying multiple Roles to a user in the user table. You can use a Multiple Texts column for that although that column type is still technically in preview. However, the only way to populate it is via an array, and since itās a Role column, your best option is probably calling a webhook workflow that can copy a non-role array column to the Multiple Texts column. Any workflow that runs server side should work, with the exception of the app interaction workflow, which runs client side. Not sure if the API can even touch that type of column, so thatās why I recommend a workflow. A little more work to set up initially compared to just popping a value into a google sheet. Also, itās a single column as opposed to multiple individual columns in your sheet, so it makes sense that if you are using a glide based table, you still have a single column that contains multiple Roles that you can assign as the Role column.
Good point on the 9 row owner limit. Really not sure if that would still apply or not. My original assumption was that while the Multiple Texts column can contain virtually unlimited array items, I would also think that it also could contain unlimited row owners, but itās not something Iāve tested with more than 2 or 3 array items, so you may or may not be correct. The biggest advantage is not having to have individual columns for each row owner. The disadvantage is that you canāt directly fill it, so you would need to use a Set Column action to copy any kind of other array of into it. Could be copying from a Lookup or a Make Array for example. There may be a catch where you would have to use a custom form and fill it during the add row action due to losing ownership when trying to do a set column action immediately after the row is added. Otherwise, you would have to rely on a server side workflow, much like you would when setting the user roles.
I think that might be a red herring. The limit of 9 was on Roles, not Row Owners. As far as Iām aware, there has never been any limit on the number of Row Owner columns.
It can, you just need to send a collection of values, eg: ["Admin", "User", "Staff"]
Hi Jeff, Thanks for the advice. So to clarify, still getting my head fully around the app:
In my users table i create a multiple texts - which contains all the productions they have viewing privileges to and admin if its appropriate. Then on any table that has productions ID in it, i use that as a row-owner and add another row that has admin as single value in every recor., then it compares that rows to if its included in the multiple texts array and allows viewing/downloading the info?
UPDATE
OK - may be a limitation of using free plan currently - but running into this now:
Created an array with User Type + Allowed Shows.
Set it successfully (it seemed) to Multi-Text - Shows as correct in Data Viewer.
Set the Roles to be Multi-text
Change productions to make sure On Submit work flow is working! seems to work.
Move screens to do other work - Come back and its changed back to what i set the first time. - is this cause its server side or result of Row action not worklfow Loop? - and Roles is stored in a hidden field etc?