Get assigned role of approved user

Returns the user role (Admin or User).

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).




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

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.

See also

Manage app permissions for individual users

Require sign-in: The Essentials


Was this helpful?
How can we improve it?
Clear search
Close search
Google apps
Main menu
Search Help Center