cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stapes
Post Prodigy
Post Prodigy

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.

View solution in original post

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,322)