Forum Discussion
Best way to build a dynamic data driven navigation, that can be restricted based on security roles
Patrick Rote The way I did this recently was to have a list on the SharePoint site with the title column for the email address and a choice column for the role (User or Admin). Then in the App.OnStart I had the following to set a variable:
If(LookUp(Admin, And(Title = User().Email), Role.Value="Admin"), Set(varAdmin, true), Set(varAdmin, false));
That variable would decide whether a button that navigates to the admin screens was visible - the end users wanted a separate button for admins rather than having it as part of the tablist.
So the Visible property of the button has: If(varAdmin=true, true, false)
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, Power Platform, WSP Global (and classic 1967 Morris Traveller driver)