Skip to main content

Notifications

Community site session details

Community site session details

Session Id : o/XYc6HDcqqd5LGG8CiY4g
Power Apps - Building Power Apps
Answered

Can you set a "default image" if the selected item doesn't have a photo?

Like (0) ShareShare
ReportReport
Posted on 1 Mar 2024 14:11:30 by 439

I have a dropdown that references an employee list in SharePoint. When the item / person is selected, there's an image element that brings up the image found in the Picture column. Not all employees have photos though.  

 

Is there some way to display a default image, like the one below, if the Picture Column for the selected item in the SharePoint list is empty? 

 

usericon.png

Categories:
  • timl Profile Picture
    35,065 Super User 2025 Season 1 on 01 Mar 2024 at 16:36:30
    Re: Can you set a "default image" if the selected item doesn't have a photo?

    Hi @anthonys123 

    An alternative/shorter approach is to call the Coalesce function:
    https://learn.microsoft.com/en-gb/power-platform/power-fx/reference/function-isblank-isempty

     

    Coalesce(
     PersonPicker.Selected.Picture,
     blankuser.image
    )
    

     

  • Verified answer
    anthonys123 Profile Picture
    439 on 01 Mar 2024 at 16:30:39
    Re: Can you set a "default image" if the selected item doesn't have a photo?

    Got it! Took a little finessing, but this works. Thank you!!

     

    If(IsBlank(PersonPicker.Selected.Picture),(blankuser.image),PersonPicker.Selected.Picture)
  • Verified answer
    Fardy_MADI Profile Picture
    315 Super User 2024 Season 1 on 01 Mar 2024 at 15:08:05
    Re: Can you set a "default image" if the selected item doesn't have a photo?

    Hi @anthonys123

    Add your default image in your apps. Then try this formula in the default property :

     

    If(IsBlank(YourPictureColonm), YourDefaultImage, YourPictureColonm)

     

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 223 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 110

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 89 Super User 2025 Season 1

Overall leaderboard
Loading started