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 / Displaying people pick...
Power Apps
Answered

Displaying people picker Image. Formula Help needed

(0) ShareShare
ReportReport
Posted on by 1,151

Hi All
hope you are all safe 🙂
I have have this formula on an image which populates from the people picker in a form.

If(Office365Users.UserPhotoMetadata(DataCardValue2.Selected.Email).HasPhoto=false,SampleImage,Office365Users.UserPhoto(DataCardValue2.Selected.Email))

 

Unfortunately it returns a runtime error even though it does work.
This is shown as an error message to the user
Thanks 
Gary

Categories:
  • gazzo1967 Profile Picture
    1,151 on at

    awww come on you fantastic solvers it must be a simple thing I'm missing 😞
    I know its easy to do if its the logged in user but I'm not after the logged in person but the person being selected in the people picker.
    And i know I'm using the email instead of the userid.
    Error for user logged in

    gazzo1967_0-1646776199807.png

    Thanks in Advance 🙂
    Gary

  • Verified answer
    gazzo1967 Profile Picture
    1,151 on at

    Its ok i worked out my mistake!!
    For others the solution is
    If(IsBlank(DataCardValue2.Selected.Email),SampleImage,Office365Users.UserPhotoV2(DataCardValue2.Selected.Email))

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 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard