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 / How I get an "Add Pict...
Power Apps
Unanswered

How I get an "Add Picture With Image" button to work?

(0) ShareShare
ReportReport
Posted on by 8
I'm very new to Power Apps. I'm trying to populate a screen with data from a collection variable. The picker button works for the most part. I want to load the Image with the image in the collection. I tried this:
If( Not IsBlank(AddMediaButton1.Media), AddMediaButton1.Media, Not IsBlank(StepsView.Selected.Photo),StepsView.Selected.Photo, SampleImage)
This has an error that the statement is not returning an Image. The error is "Expected Image Value". However, these variations, which don't work, don't have errors:
If( Not IsBlank(AddMediaButton1.Media), AddMediaButton1.Media, SampleImage) // No Photo
If(  Not IsBlank(StepsView.Selected.Photo),StepsView.Selected.Photo, SampleImage) // No Media
I have no control of the Button.Media. I can't set it, I can "Reset" it. Can I change "Photo" to something compatible with Media?
 
Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,908 Moderator on at
    Assuming StepsView is your gallery with the collection set as your items.
    If you use 
    StepsView.Selected.Photo
    in your image control are you seeing a photo?
  • RM-13111543-0 Profile Picture
    8 on at
    Yes, and I see the selected image when I push it to a List with a "Collect".
  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at
     
    Hi RM-13111543-0
     
    Can you clarify where you're calling this formula, and perhaps post the code you're using to build the collection?
     
    With regard to the "Expected Image value" error, the control should include an image control (it'll be named something like UploadedImage1). If you reference this instead, that should hopefully return an image value.
     
    If( Not IsBlank(AddMediaButton1.Media), UploadedImage1.Image, SampleImage)
     
  • ronaldwalcott Profile Picture
    3,908 Moderator on at
    If you are seeing the image what is the purpose of the code that you are adding?
    Do you want to display something in particular if there isn't an image, or load an image?
    What functionality are you trying to add?  
  • RM-13111543-0 Profile Picture
    8 on at
    So,
    Solved it. I had to add a delay into the OnChange in the Button. I stored the image into the collection before it actually changed, So I was getting the SampleImage or an old image. Seems to be working now.

    Thank you for the replies!

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
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard