Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

StartScreen Role Based Navigation

Like (1) ShareShare
ReportReport
Posted on 17 Dec 2024 22:28:20 by 6
I'm using StartScreen to add some deep linking to my app. I want to provide a link to the admin page but need it to navigate to the home screen if the current user is not on the user SharePoint list I have setup. I have tried various different formulas to no avail. This is the one that seemed most promising but still only wants to navigate to the admin screen. 
 
Switch(
Param("screenname"),
"viewedit",
'scrn_ViewReq',
"admin",
If(
!IsBlank(
Filter(
'User List', User.Email = User().Email
)
),
'scrn_Admin',
'scrn_Main'
),
'scrn_Main'
)
  • CU17122216-0 Profile Picture
    CU17122216-0 6 on 18 Dec 2024 at 16:57:44
    StartScreen Role Based Navigation
    I figured out the problem. At my organization, we technically have two emails; one with our name and one with our employee ID. Turns out the User().Email pulls our employee ID email and the people picker field in SharePoint is our name email. 
     
    This is what I ended up doing:
     
    If(!IsBlank(LookUp('User List',Employee_ID = Left(User().Email,5)
     
     
  • Suggested answer
    Mehmet_Powerapps Profile Picture
    Mehmet_Powerapps 26 on 18 Dec 2024 at 09:17:43
    StartScreen Role Based Navigation
    I found this solution, 
    Switch(
        Param("screenname"),
        "viewedit", 
        'scrn_ViewReq', 
        "admin", 
        If(
            CountRows(
                Filter(
                    'User List', 
                    User.Email = User().Email
                )
            ) > 0, 
            'scrn_Admin', 
            'scrn_Main'
        ), 
        'scrn_Main'
    )
  • CU17122216-0 Profile Picture
    CU17122216-0 6 on 18 Dec 2024 at 01:50:29
    StartScreen Role Based Navigation
    I tried LookUp as well. I'll try it again tomorrow to be sure. Thank you for your response! 
  • WarrenBelz Profile Picture
    WarrenBelz 143,803 on 17 Dec 2024 at 23:14:49
    StartScreen Role Based Navigation
    Hi @CU17122216-0​​​​​​​
    Try this - If you use Filter, you need to test for Empty as it is a Table
    Switch(
       Param("screenname"),
       "viewedit",
       'scrn_ViewReq',
       "admin",
       If(
          !IsBlank(
             LookUp(
                'User List', 
                User.Email = User().Email
             )
          ),
          'scrn_Admin',
          'scrn_Main'
       ),
       'scrn_Main'
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,803

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,140

Leaderboard
Loading started