Hi everyone,
I'm trying to restrict who can edit a form within my app to a set Super Users list and also to people identified as owners within the form. I'm aware that people could still go directly to the SharePoint list and edit from there but that's not really a worry for my deployment.
I have a list that contains who is a Super User and that is connected to my app along with the normal list.
When my app launches, this runs OnStart
Set(SuperUsers, LookUp('Super Users', Title = User().Email))
Each form has 2 fields that are people pickers. First one is 'Person Responsible' and the other is 'PI(s)'. So the idea is that everyone who is a Super User, plus the Person Responsible and PI(s) can edit and everyone else is restricted to view for a particular item.
I took a look at this and amended it to the following to no success. I left out the PI(s) to test to see if it works.
If(SuperUsers.IsSuperUser||
ThisItem.'Person Responsible'.Email=User().Email,
FormMode.Edit,
FormMode.View)
Would anyone be able to help please?
Thanks