Examples

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

Return Value

Text: either Admin or User, indicating the user's designated role.

Notes

Approved users are defined in the app editor in the Users pane in the Users tab.

User role assignments can only be changed through the app editor.

The only available roles are Admin and User. There is no way to add, modify, or remove roles.

The USERROLE() function is only available if the app requires user sign-in.

Did this answer your question?