Row Owner with role - glide automatically writes user e-mail instead of role

Hey, guys!

I have recently set the row owner mecanism in my app using the role column (image below).

image

But everytime a row is created, Glide automatically writes the user’s e-mail in the row owner column instead of the ‘role’ value.
My ‘role’ value in user’s table is the client’s company name; so it should be writing that in the row owner column, and not the user’s personal e-mail. (another image below)

I have even tried to create an ‘set column value’ action to replace the e-mail with the role, but it does no good.

Am I doing anything wrong?

For reference, this is how my user’s table is set up:
(I tried marking e-mail and “cliente” (role) column as role owner; then I tried only with role column, but none solves the problem)

Hi, Werther!
Actually, you no need to set Role column as Row owner.
I don’t know how you planning to use row owner, and please show how you create new row. And actually, you can write to Role column only role from user role column who add the new row, except when Glide do it.
Seems like you wrongly configured add row action or form submit action…

Hi, mate!

Thanks for the super fast reply! :smiley:

I plan to use the row owner to restrict data traffic, to make sure each user’s device download only what said user is authorized to see.

And actually, you can write to Role column only role from user role column who add the new row, except when Glide do it.

I didn’t understand what you meant, could you explain it further, please?

Before I set row owner up, I was using simple filters to restrict views. To make that work, I created an action (set column values) to write the role in a column everytime someone added a row via ‘form screen’.

Here is the action:


I just made several tests and the action doesn’t seem to be the problem. I have set the form screen to perform only the default action (which is ‘none’) and the problem continues: it writes the user’s email, and not user’s role.

I think something must be wrong with the row owner/role set up

Okay! This is set column value action and i think is to late to set column if you have role column configured as row owner.
Tell me please how user’s rows coming to user table? Have you added row? Or glide added user row?
If you want to setup role from an app, not from editor, so you exactly need firstly add row to user row at once with role.
And don’t use role column as row owner. If you want to isolate users rows you should use user email as row owner. And if you want all users with company role can access each other rows so you need to create separate row name it Access, write to it company name and set it to row owner column.

How is the user’s row actually created?

I create user’s row manually, but the problem I described here isn’t with user’s table; it’s in another table that uses one row owner column.
Everytime a user creates a row in this second table, via form screen, the column I designated to be the row owner is automatically filled with the user’s email instead of the user’s role, and I can’t find a way to change that.

I don’t want the row owner column to be filled with user’s email because one company can have many users, and every user in that company should be able to see everything related to that company. That’s why I need to use roles and not emails.

Please show me up this form config

I made this video now to better show you what I’m struggling with.

Shure you must write to row owner column SYSTEM/cliente at once at creating row. EXACTLY not on submit!
Just add data from user row directly to form

2 Likes

Wow, worked like a charm!

Thanks big time :star_struck:

1 Like

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