Skip to main content
Community site session details

Community site session details

Session Id : 7p3zmfCCbwqCsk1DSMT/U6
Power Apps - Building Power Apps
Answered

Navigate Screens according to the USER Role

Like (1) ShareShare
ReportReport
Posted on 22 Mar 2023 09:00:38 by 131

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.

 

jufguu_0-1679475384138.png

 

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***

 

jufguu_1-1679475538412.png

 

 

  • Verified answer
    Akser Profile Picture
    1,546 Moderator on 22 Mar 2023 at 09:36:37
    Re: Navigate Screens according to the USER Role

    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
    )

     

     

  • NZ0090 Profile Picture
    317 on 22 Mar 2023 at 09:29:54
    Re: Navigate Screens according to the USER Role

    @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'
    )
  • Samuel-Zhou Profile Picture
    393 on 22 Mar 2023 at 09:24:48
    Re: Navigate Screens according to the USER Role

    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~

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete