cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stapes
Impactful Individual
Impactful Individual

How do I reset an Add Picture control.?

How do I reset the Add Picture control. First time it opens, it displays the Sample Image. I would like it to revert to this each time the screen is loaded.

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User
Super User

I suggest you try this:

In the Onvisible of the screen create a variable:

UpdateContext({ShowSample:true} )

 

Then in the image;

If(ShowSample,SampleImage,Cemera1.Photo)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

5 REPLIES 5
eka24
Super User
Super User

I suggest you try this:

In the Onvisible of the screen create a variable:

UpdateContext({ShowSample:true} )

 

Then in the image;

If(ShowSample,SampleImage,Cemera1.Photo)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

eka24
Super User
Super User

@stapes 

Am checking if the issue is resolved?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 ,

When do you update the ShowSample variable to false?

Thanks,

Fernando

It depends on your situation. In the case above anytime he navigate to another screen the variable is set to false automatically since it UpdateContext. 

 

However if on the same screen you want to Set it to false, you can insert a Button and Onselect;

UpdateContext({ShowSample:false} )

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 ,
I was having problems using Reset(AddMediaButton) but now I can use it and it works fine.

Thanks,

Fernando

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,711)