Returns the role assigned to the current, signed-in user (such as Admin
or User
).
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.