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 / 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,847 Super User 2025 Season 2 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
    36,383 Super User 2025 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,847 Super User 2025 Season 2 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

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard