Hello,
I am looking to restrict access to a manager page within my powerapps application. I am wanting to do so by referring to a people picker column I have in a SharePoint list that hosts all the manager's information.
I am wanting to do so by doing something like this on visible property of a label:
If(Datasouce.ManagerPicker.Email = User().email, true, false)
OR
I have explored the option of trying something similar on the OnSelect property:
If(Datasource.ManagerPicker.Email = User().email, Navigate(managerPage),
Notify("You don't have permission to navigate to that page.", Error))
I am aware that this can be done if I type in a specific email address like so:
If(User().Email = "manager'sEmailAddress", navigate(managerPage), Notify(Error message)
I am trying to avoid that at all costs because there are several managers within the org. and if they change, I will have to manually change the syntax each time. This is why referring to the people picker column would be much easier.
Thanks for any assistance!