Security Filters for different level of app users

Hi 

I am new to Appsheet and not from a developing background.

I am stuck with security filters for my app. 

I have 3 levels of access

  • Super - Full access to the app and all its data
  • BSO - Access to edit their data under their useremail as well as view other's data who are in the same department.
  • User - only accesses their data, under their useremail but can edit and add.

I tried to follow and training video online which unfortunately did not work. Here is a snap of my user table and data table.

Ange_Law_1-1708105709981.png

Ange_Law_0-1708105687805.png

This is the expression I used:

IFS(
ANY(Users[Role])='Super',
TRUE,
ANY(Users[Role])='BSO',
OR(
[Email address]=USEREMAIL(),
AND(
[Email address].[Department]=ANY(Users[Department]),
[Email address].[Role]='User'
)
),
TRUE,
[Email address]=USEREMAIL()
)

Any help would be appreciated. I'm pulling my hair out trying to get it to work.

0 6 629
6 REPLIES 6