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 / Clear AddMediaWithImag...
Power Apps
Answered

Clear AddMediaWithImage control in gallery

(0) ShareShare
ReportReport
Posted on by 22

Hi, 

 

I am creating a checklist in a gallery where questions come from a SharePoint list and user selects radio buttons for answers and also has an option to add comments or media. 

I have used the AddMediaWithImage control in the gallery, however once the user submits their answers, I want to reset the image back to the sample image. 

Currently the image that was selected for the first question appears as default for all questions for the next user. 

 

At the moment I have UploadedImage1: Image = If(IsBlank(AddMediaButton1.Media), SampleImage, AddMediaButton1.Media)

I have tried Reset(UploadedImage1) in my Submit button, however I get an error saying this is not a resettable control.

 

Are there any solutions to this or other controls that might be more suitable for loading files in gallery? 

 

AddImage.png
AddImage2.png
Categories:
  • Verified answer
    alexneedleman Profile Picture
    45 on at

    Hey Cath!

    What I would recommend as a solution would be to create a variable for your Image value in your form, and then manipulate it with the Submit button's OnSelect Property.

    So first, set the OnVisible property of whatever screen your media upload control is in to Set(FormImage, SampleImage). 

    Then, change UploadedImage1: Image = If(IsBlank(AddMediaButton1.Media), FormImage, AddMediaButton1.Media)

    Then in your Submit button, add another function to its OnSelect property (using a ; to separate commands) to the same value, Set(FormImage, SampleImage). This should make it so that once they click submit, the image goes back to the sample. 

    Hope this helps!

  • Verified answer
    cathrose Profile Picture
    22 on at

    Hi Alex,

    Thanks so much for the speedy response. I followed these instructions and still having the same issue. Instead of resetting to the sample image. It is resetting to the first image uploaded on previous submission. I have attached some screenshots. Can you see anything wrong with my formulas? 

    AddPic3.png
    AddPic2.png
    AddPic1.png
  • cathrose Profile Picture
    22 on at

    This is working now! Thanks!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard