Hi All,
I am developing a logistics apps with the following variables set OnStart. These variables are used to determine if the user has certain visibility for case management (i.e. Approve/Reject).
//Set user based security
Set(varUser,User());
Set(isUserAdminSPList,!IsBlank(LookUp('User Roles',User.Email=varUser.Email&&Role.Value="Administrator")));
Set(isUserCMSPList,!IsBlank(LookUp('User Roles',User.Email=varUser.Email&&Role.Value="Construction Manager")));
Set(isUserPMSPList,!IsBlank(LookUp('User Roles',User.Email=varUser.Email&&Role.Value="Project Manager")));
Set(isUserBUHSPList,!IsBlank(LookUp('User Roles',User.Email=varUser.Email&&Role.Value="BUH")))
*'User Roles' is the name of my sharepoint list.
Attached a screenshot of a filtered gallery showing only items made by current user through condition:
varUser.Email = User.Email
How do I allow for other users such as:
1. isUserAdminSPList to be able to view all items in the gallery
2. isUserCMSPList to be able to view all items in the gallery for the identified 5 sites they belong to
Attached the screenshot of 'User Roles'
I think the logic to go about is:
If(isUserAdminSPList, <view all gallery items>, <filter only current user items>)
If(isUserCMSPList, <view all gallery items for the 5 project sites>, <filter only current user items>)

Report
All responses (
Answers (