USERROLE()

Get assigned role of current user

Returns the role assigned to the current, signed-in user (such as Admin or User). 

To assign a role to users, see Manage app permissions for individual users. Valid roles are Admin or User. You cannot add or remove roles.

Sample usage

IF((USERROLE() = "Admin"), "ALL_CHANGES", "UPDATES_ONLY"), when used as a table's Are updates allowed? expression, allows an approved user with the Admin role full access to the table while allowing all other users only update access.

(USERROLE() = "Admin"), when used as a column's Show_If or Edit_If expression, allows only approved users with the Admin role to view or edit the column.

OR((USEREMAIL() = [Email]), (USERROLE() = "Admin")), if used as a security filter expression, includes the row if the Email column value matches the current user's email address, or if the current user has the Admin role (allowing an Admin to access all rows).

Syntax

USERROLE()

Notes

USERROLE() is only applicable if the app requires user sign-in.

See also

Manage permissions for individual users

Require sign-in: The Essentials

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

true
Search
Clear search
Close search
Google apps
Main menu