Skip to main content

Notifications

Community site session details

Community site session details

Session Id : wSmuWzpfnTQQtAjIzy66Au
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 426

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
    34,955 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
    426 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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,700 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard
Loading started