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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Logged in user vs user...
Power Apps
Unanswered

Logged in user vs user in people picker field

(0) ShareShare
ReportReport
Posted on by

I have a PowerApp where a SharePoint list is the data source. A people picker field is in the list. The app allows a user to enter a position request. The people picker field in the app is for who is creating the request. One screen in the app is "My Requests" which filters a gallery by all record's whose people picker field match that of the current logged in user.  This works beautifully; however we have a few users that belong to a different department whose email addresses do not match ours.  We have assigned them an F3 license for them to use our app, which gives them an email address matching our organization. Therefore, when they enter the position request, they select themselves in the people picker field, which uses the email address of abc@da.gov (for example) from their organization, but the logged in user is abc@myorg.gov (for example), from our organization. As a result the filter in the gallery doesn't resolve to show them "My Requests". I created an On Start variable as follows: 
Set(varCurrentOfficeUser,Office365Users.MyProfileV2().userPrincipalName);
Then filtered the gallery as follows:
Filter(datasource,Requestor.Email = varCurrentOfficeUser) where Requestor is the people picker field.

It is not working. Any suggestions?





Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Have you tried placing

    varCurrentOfficeUser

    in a label to ensure that it matches the email result you are trying to filter by?

  • turnerj3 Profile Picture
    2,039 on at

    @AnnetteM ,

    Try this and see if it is a capitilization issue.

    Filter(datasource,Lower(Requestor.Email) = Lower(varCurrentOfficeUser))

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard