I want to navigate Screens according to the USER Role. I Have 6 Super Users and 2 Normal Users. But once I Started to App Only 1st Super user Can see the Super User screen. Other Super Users can't navigate to that screen, Here are the code I Used and SP list below. Plz help me.
SP list
It only navigate to Super User Screen once the 1st Super User (In my case *Vineeth*) logged in. when other supers users try they can't***
Hi @jufguu,
I would add a (similar) formula 'OnStart' of your application. This will create a local collection and store the current user's roles (assuming they can get multiple roles);
ClearCollect(
colUser,
Filter(
'My SP List',
UserEmail = User().Email
))
Then you can apply your logic:
If(
"Admin(HR person)" in colUser.'User Role', Screen 1,
"Super User" in colUser.'User Role', Screen 2,
"Normal User" in colUser.'User Role', Screen 3,
"View Only User" in colUser.'User Role', Screen 4
)
@jufguu Can you try this?
If(
LookUp(UserDetails, UserEmail=Office365Users.UserProfile(User().Email).Mail, 'User Role') = "Super User", 'Landing Screen for Super User',
LookUp(UserDetails, UserEmail=Office365Users.UserProfile(User().Email).Mail, 'User Role') = "Normal User", 'Landing Screen',
LookUp(UserDetails, UserEmail=Office365Users.UserProfile(User().Email).Mail, 'User Role') = "Admin(HR person)", scrnRegisterFacilities,
LookUp(UserDetails, UserEmail=Office365Users.UserProfile(User().Email).Mail, 'User Role') = "View Only User", 'Calander Screen'
)
Hi @jufguu
If your first code attempt is to input
If(User().Email=LookUp(UserDetails, 'User Role'.value = "Super User", UserEmail), 'Landing screen for super user'
Can this be successful? You can try it~
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473