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 / Hide fields based on t...
Power Apps
Unanswered

Hide fields based on the user

(0) ShareShare
ReportReport
Posted on by 319

Hi,

 

I am looking to code a way to hide certain fields in one of the screen depending upon the email in one of the fields.

 

There is a another column is the same list called as 'Line Manager Name' which is of Person or group type. I need to check if the email address of this 'Line Manager Name' column matches with one who is viewing the form that is only when I need the below fields to be visible. I have already added the Office365 connector to the app.

 

Prathameshpatka_0-1643111945699.png

 

 

 

Categories:
I have the same question (0)
  • Dant7484 Profile Picture
    154 on at

    I'm sorry i'm a bit confused here but do you want to compare current user with values in a list or do you want to compare it with an input field?

    If it's the latter then maybe something like 

    If(Office365Users.MyProfile().UserPrincipalName = TextInput1.Text, true, false)

    in "visible" of the fields you want to hide/show or put it in a variable.

    If it's the first one then maybe this If(!IsBlank(LookUp(List, User.Email = Office365Users.MyProfile().UserPrincipalName)), true, false)

    Hope this helps

     

    Edit : edited mistake in 2nd formula

  • Prathameshpatka Profile Picture
    319 on at

    @Dant7484 

     

    I have a person or group type Line Manager column in the list which is updated by a flow at the backend. The flow updates the list when the item is created :

     

    Prathameshpatka_0-1643621809943.png

     

    On the Power apps the field visibility is been controlled by using the below code :

     

    Office365Users.UserProfile(User().Email).Mail = DataCardValue20.Selected.Email

     

    Wherein the datacardvalue20 is the field where in the line manager email is updated by the flow.

     

    I did a test but the fields are still not visible for the line manager. What wrong I am doing here ?

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard