web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Building Manager View ...
Power Apps
Answered

Building Manager View in Powerapps

(0) ShareShare
ReportReport
Posted on by 110

I am building a power apps for purchase order with a sharepoint list (List 1). Also, I created another sharepoint list for storing information of manager(list 2). Column type is 'Person or Group' and its name is User Name.

 

The form has two sections: order details filled by requestor and approval information filled by manager. I would like to set display mode to disabled when current user is not manager. When user is a manger, display mode will change to edit.

 

I am using the following logic in DisplayMode in power apps:

If(And(ViewForm.Mode=FormMode.Edit,!IsBlank(LookUp('List 2','User Name'.Email=User().Email).'User Name'.Email)),DisplayMode.Edit,Disabled)

 

However, lookup function cannot retrieve user email. Result is blank.

Ceres2186489_0-1673512001812.png

 

Any improvement for the formulas? Thanks a lot.

 

Categories:
  • Verified answer
    BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Ceres2186489 ,

     

    Could it be the result is coming up as blank() because you are not included on the 'Purchase Order Approval' list?

     

    Regarding your code, I can only suggest to use formatting, don't selected the 'user name'.Email in the LookUp and to replace the And() with &&. All of these are just changes to improve the "readability" of the code, but don't change anything about the outcome.

     

    If(
    	ViewForm.Mode=FormMode.Edit && !IsBlank(LookUp('List 2','User Name'.Email=User().Email)),
    	DisplayMode.Edit,
    	DisplayMode.Disabled
    )

     

  • Ceres2186489 Profile Picture
    110 on at

    I add a column which is directly typing my email in text column and hope to match value in this text column with user().Email.

     

    Ceres2186489_0-1673516010578.png

     

    If i click user().Email, it show my email correctly in result. However, when i point to email, it cannot retrieve the value in text column. Any modification for the formula? 

     

    Many thanks.

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Ceres2186489 ,

     

    The condition you are using is case sensitive. May that be the cause of the issue? to rule this out, you can wrap 'Email' and User().Email in Lower() functions.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard