I trying to make limit for admin and user role for the AppSheet

Danial_0-1657871497034.png

Security filter formula I use :
IF((USERROLE() = "Admin"), "ALL_CHANGES", "READ_ONLY")

AppSheet said I need to return true or false

Solved Solved
0 1 95
1 ACCEPTED SOLUTION

Welcome to the AppSheet community !

Security filter filters the records that reach different users' devices based on the expression.  They do not control record level add/update permissions.

Security filters: The Essentials - AppSheet Help

For controlling if a record can be edited or read by user please use the below option "Are updates allowed" under Date --> Table option 

Control add, update, and delete operations - AppSheet Help

So you could use an expression something like below in "Are updates allowed" 

SWITCH(USERROLE(), 
  "Admin", ALL_CHANGES",
  "READ_ONLY")

Or it can be as per your expression 

IF((USERROLE() = "Admin"), "ALL_CHANGES", "READ_ONLY")

 

View solution in original post

1 REPLY 1

Welcome to the AppSheet community !

Security filter filters the records that reach different users' devices based on the expression.  They do not control record level add/update permissions.

Security filters: The Essentials - AppSheet Help

For controlling if a record can be edited or read by user please use the below option "Are updates allowed" under Date --> Table option 

Control add, update, and delete operations - AppSheet Help

So you could use an expression something like below in "Are updates allowed" 

SWITCH(USERROLE(), 
  "Admin", ALL_CHANGES",
  "READ_ONLY")

Or it can be as per your expression 

IF((USERROLE() = "Admin"), "ALL_CHANGES", "READ_ONLY")

 

Top Labels in this Space