Being able to add roles from the app and not only the editor

Now test it on the real app and tell me if it works. In the editor it works beautifully, but not in the real app, or at least for me.
And now I’m getting sync issues and I can even tell you if it works with the if-then-else in google sheets. My data is not synchronising with the spreadsheet… :sob: :sob:

Okay, this is interesting…

I have multiple role columns, so I decided to test to see if I could change more than one using Set Columns.
I set my app up like this:

  • Both choice components write to separate user specific columns
  • Then on submit, the role columns are updated via a Set Columns action
  • “Primary Role” is written to “Role 1”, and “Secondary Role” is written to “Role 2”

Results:

  • Via the builder:
    • Both columns are updated
  • Via the app
    • only the Secondary Role (Role 2) is updated

So… it looks like you can use this method to update roles, as long as it’s not the first column in the array :rofl:

Gonna try now with 3 Role columns and see what happens…

UPDATE
Tested with 3 role columns, and result as expected…

  • Via the builder
    • All 3 Role columns updated
  • Via the app
    • Role 1 unchanged, Role 2 & Role 3 updated

So as I will have many many roles, the array way doesn’t work for me. So the way I’ve done it (and it works) use the ite. I have a column, in this case, with the name of the company (which will be the role), and by using the formula in the spreadsheet it creates the role. So the formula that results in the role is =ARRAYFORMULA(IF(E7<>"";E7:E;"")). Column E, in this case, is the name of the company that also results in the Role. So I can say that problem temporarily solved, however, it’d be ideal if we can just add a role without having to add formulas (@Mark , great feature to add to the list, AND YOU CAN DO IT LIVE ON THURSDAY!!! :slight_smile: )

Ouu and forgot, make sure you vote so we catch @david’s attention :wink:

1 Like

yeah, it sound like you’re basically using roles as method for multi-tenancy, which is a completely different use case to mine. But we’ve both bumped into the same limitation.

Sorry, I don’t understand what you’re asking for.

Solving the request I added this Thursday :slight_smile: Being able to add roles from the app without having to manually enter them in the database

1 Like

Hope I don’t add to the confusion, but can’t you manually assign a role to the head HR person at each company when they join, who then has permission enter a person’s profile via an Inline list, click edit, which is only visible to a HR person and update that individual’s Role?

That’s the whole point, to be able to add it without having to click edit, just when you create the user from the app

yes, except that doesn’t work :slight_smile:

Well I dont think it works for his specific use case. But in my app, I have Users, Contributors and Admin. As Admin, via the app, I can access people’s profiles, click the edit pencil and update the text field, which houses the Role. The Text Field is only visible to Admins so a User or Contributor cannot change it themselves.

Maybe I dont have roles setup correctly? Its just a text column called “Access Level” lol.

mmm, what I’ve been referring to are the Roles that are only available with a Private Pro plan.

What you have could probably be called “pseudo-roles”. Perfectly fine for driving visibility, but cannot be used as Row Owners.

Ah yes, I don’t use Private Pro :slight_smile:

See… I added to the confusion :smiley:

And now I see: "At the moment, you cannot change somebody’s role via the app. A role can only be changed via the sheet or Data Editor. If you show the Roles column in the app somewhere, users will be able to change the value - but this will not affect the backend and you will see the value change back. "

yes, that’s right. Except (as my earlier test demonstrated) you can change somebody’s role via the app, but only if you’re using an array column for your roles - and then you can change all but the first column in the array. That’s probably a bug, but please don’t tell anyone as I’m intending to exploit it :wink:

3 Likes

I’ll update this question.
Has anyone found a way to change user roles through the application?

I believe you can change the role as long as the user making the change also contains the same role they are changing it to. A role cannot be changed to a role that the user does not belong to.

Thank you.
Your answer means that super-admin roles have not yet been invented. :grinning:

1 Like

If your User Profiles table is connected to a Google Sheet, then it’s possible by using a 3rd party such as Make. I’ve not tested it via the Glide API. I suspect that it wouldn’t work. If it does, that might be considered a security hole.

You can set it via API in a Glide table. If that is ever changed, I’ll have apps dead in the water. :grimacing:

Edit: I would be surprised if this ability was removed from only Glide tables, because it could still be done in Google Sheets or Airtable.

1 Like

I won’t tell anyone :wink:

Thaaaaaank yooooouuuu! :wink:

1 Like