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 / Check if current logge...
Power Apps
Answered

Check if current logged in user is equal to a specific field

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

 Hi, beginner user of powerapps here!

 

I would like a form to only display specific fields dependent on if the current user logged in matches the user name in a column. I have already cached current user on start by using "Set(CurrentUser, User())" on OnStart property. 

 

In specifics, this has to do with onboarding a new employee. HR will initiate a new form (entry) in a list named "Onboarding" and will fill fields, including one titled "Supervisor". Once HR has finished the form, an email will be sent out to the supervisor that was entered in the "Supervisor" field by HR, stating to fill out the HR form. This would be the same form that HR filled out but with only specific fields visible for the supervisor to fill out.

 

I'd like powerapps to match the current logged in user to the name in the "Supervisor" column, and if it's a match, display a field. If not, don't display

 

Thanks in advance.

Categories:
  • tchin-nin Profile Picture
    779 on at

    Hi @Anonymous,

    Are you using a SharePoint List ?

    If so, are you building an entire App based on your SP list or are you customize this list forms ?

     

    You can use this kind of formula in the Visible property of the DataCard you want to show only to the Supervisor :

     

    Dard.Visible : currentItem.Supervisor.Email=CurrentUser.Email

     

    Just need to determine how to have this currentItem object, and that depends whether you're building an app or customizing SP forms. 

     

    Théo

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Théo,

     

    It is a sharepoint list and I am customizing the list form. Thanks!

  • Verified answer
    tchin-nin Profile Picture
    779 on at

    Ok then you should try :

     

    DataCard.Visible:

    SharePointIntegration.Selected.Supervisor.Email=CurrentUser.Email

     

    Theo

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    And would I need to integrate true,otherwise false? If so, how would I do this?

  • tchin-nin Profile Picture
    779 on at

    The Visible Property expects a boolean so true or false value .

     

    You can do if(condition,true,false)

     

    But as testing your condition directly returns a boolean you don't need the if function.

    Putting the condition as is in the Visible property will work. 

     

    Théo

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much Theo, this worked perfectly!

  • DaynaBee Profile Picture
    309 on at

    @tchin-nin  Hi Theo,

     

    I am creating an app instead of customizing the list form. How would do I go about the current item object ? 

     

    Thanks in advance,

  • tchin-nin Profile Picture
    779 on at
    Hi,
    That depends on how do you get the item.
    Is the item selected in a gallery ?

    Regards,
    Theo
  • DaynaBee Profile Picture
    309 on at

    @tchin-nin 

    Hi Theo,

     

    Thank you for the swift reply, The item is being selected from the Browse Calgary, which opens a detail form & the user can edit the item. The edit form is where I am trying to make fields visible if the currently logged in user= user in reviewer field. 

     

    Best,

  • jatin24 Profile Picture
    2 on at

    Taking this a step further..

    Lets say i have a custom list that holds names of supervisors/approvers, something like this:

    Stage1    Joe Blogs

    Stage2    Dave Smith

    Stage3    Matt Roberts

     

    In the initial form/app, i specify the stage = Stage2.

    I am able to integrate the approvers list using SharePoint Integration successfully.

    now how do i get the form to pick up the Approver Name where stage = Stage2 (as specified in the form)? So only when Dave Smith logs on, specific fields become visible.

    Thanks

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard