Is there a simpler way: Row-Owners

Hello everyone, great to be here! I’m new and newly certified! I’m in the process of completing the schema for an app that will:

  • allow judges to login and judge segments of open events of the organisation the judge is a part of
  • allow admins to configure and see everything for the organisation s/he is the admin for which includes CRUD for events, segments, contestants, judges, and scores.
  • allow super admins to configure and see everything for all organisations which includes CRUD for organisations, admins, events, segments, contestants, judges, and scores

Initially I was considering the use of roles (email addresses) and I quickly saw I may have issues. I have now started to consider using the organisation as and additional rowowner in all related tables. This is my current thought process:

  • The super admin will have his/her Organisation field blank. This user will have the role as Super-Admin.
  • Applicable tables will have a Role field as the Row-owner
  • Organisation admins will have their Organistaion field filled.
  • Applicable tables will have an Organisation field as the row-owner
  • Organisation judges will have their email addresses filled in
  • Applicable tables will have the judge email field set as the row-owner

Based on your experience is this an efficient configuration? Is there a simpler way? Am I missing anything? And I would be most grateful for your general thoughts on the implementation methodology.

So is your flow something like this?

Will there ever be multiple judges assigned to events and segments?

Yes, a segment will have multiple judges and a judge could judge different segments…which means I cannot use the judge’s email address as the row-owner. I cannot use the organisation as the row-owner because then s/he would have access to everything…I need something else. I know it can’t be a computed-column.

If you use a Google Sheet as the source of your Users table, then you can define up to nine Roles, which can be used as Row Owners.

2 Likes

What’s your experience been with the performance of Google Sheets in comparison to the glide tables?

Glide tables are definitely superior, but they don’t support multiple roles.
About the only time I’ll use a Google Sheet for a new App is if I need this multiple role functionality.
My suggestion would be to use a Google Sheet only for the Users table, and native Glide tables for everything else.

1 Like

I was considering multiple row-owners. If I take this route would you still say Google Sheets is superior? In what ways is Google Sheets superior, in either option? (apart from the number of rows)

I didn’t say Google Sheets are superior, and they are not in any way except that they support multiple roles.

If you only intend to use multiple Row Owner columns, then there is no reason to use a Google Sheet.

But - if you wish to assign multiple ROLES to individual users, and use those Roles as Row Owners, then your only option is a Google Sheet.

I hope that’s clear?

1 Like

Perfect, thanks for the clarification; I appreciate it. :100:

1 Like

I thought I grasped the concept but I believe I just might not.

The users table has two fields: organsation and rolename. Organisation is set as the role. Organisation has the RowID of the Organisation defined in the organisation table. RoleName has the role of the actual user. For super-admin, both rolename and organisation are set to Super-Admin.

The Events table when viewing under data table hides and shows the fields accordingly when I switch from user to user (view, admin, superadmin, or different organisation altogether).

However in the layout, the Events Collection, while it shows everything for Super-Admin. It does not show anything for the local Organisation admin. Even though I have the organisation field set as row owner in the event table and the fields indeed have the rowid for the organisation in question.

Another interesting behaviour: I have an on submit action to set the organsation field to the organisation value of the signed in user (which in this case would be local admin. If it’s super-admin, he can select the organisation from a choice field). I am yet to determine why for the local admin it does not show the choice field (with only one option - which is what I’m expecting but doesn’t happen) and it doesn’t show the events list for those events the local admin (organisation field) matches the organisation field in Events.

In my events table there is another row called RoleName. That field has the value Super-Admin. I believe having that set to Super-Admin, enables the super-admin to have full access. And for those who have the organsiation id as defined in their user profile that matches that in the row for the events table, then those rows are visible. However that is not the case.

Events Table

  • Organisation (RowOwner)
  • RoleName (RowOwner)

Users table

  • Organisation (set as ‘Role’)
  • RoleName (users role)

That won’t work. Based on what you have in your Users table, only the Organisation can be used as a Row Owner, as it is the column that is configured as the Role.

Like I said in my earlier replies, if you want users to have multiple roles and use those roles as row owners, then you must use a Google Sheet as the source of your users table.

1 Like

Update:

  • Organisation is set as Role in UsersProfile table (Users)
  • Organisation and Role are set as RowOwners in Users table
  • Applicable tables have Organisation, Role1, and Role2 as RowOwners. Role2 has Super-Admin, while Role1 has the OrgAdmin.
  • Viewing is not an issue.
  • I do however believe I made need to add a Role3 for the Judge. but that will be only for a small subset of tables.

So far this “appears” to be working.

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