cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Remove/delete a image from a input image control


Hello,


I have an app for taking information about products and save it to an Excel file. The information I get is the code of the product, some observations and about 9 pictures of every products.

 

For taking pictures I'm using "Input image" control and I'm collecting the images with Collect(Fotos;FotosGlobal.Media)-

 

The problem is that when I'm going to take new pictures for a new product the previous one still is shown. I would like to remove this picture from the control and having it clear (after saving it in the Excel and fodler in onedrive).

 

I have tried with remove and with Clearcollect but the pic is still there all the time. Please, do you know any way of doing this?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi Glocoru,

 

Are you using the Add picture control?


Do you meant that when clicking the Add picture control to add a new picture, the previous picture is still showing on the control likes below?


If yes, I have to say that it is a default behavior of the control. The previous picture you have selected won’t disappear until you select a new one.

3.PNG

 

If I misunderstand you, please feel free correct me.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Community Support
Community Support

Hi Glocoru,

 

Are you using the Add picture control?


Do you meant that when clicking the Add picture control to add a new picture, the previous picture is still showing on the control likes below?


If yes, I have to say that it is a default behavior of the control. The previous picture you have selected won’t disappear until you select a new one.

3.PNG

 

If I misunderstand you, please feel free correct me.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Yes, thank you.

Well, but.... how do I leave it blank?

You can clear the previous image with:

Reset(AddMediaButton1)=True

Regular Visitor

I know this is an old post, but you can clear the uploaded image by setting the Reset field of "AddMediaButton" to a button. You can take a look at my screenshot below for a better explanation.

 

ClearMedia.PNG

The only way I can get the image to work is to use UpdateContext to swicth the Reset Property from fales to true and back to false again
So insert a Button  that you want to use to clear the image

On the OnSelect Property of the button type the following

UpdateContext({ClearPicture:true});UpdateContext({ClearPicture:false})

 

Important that you add the UpdateContext({ClearPicture:false}) above or it will not reset

Go to your AdMedia item and to it's Reset Property and insert the UpdateContext 'ClearPicture'

 

hey presto! Does the job

P.S. I use this technique alot in Cascading Dropdowns to reset the fields lower down the order if a field higher up is changedReset.JPG

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Users online (7,180)