cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Techy1234
Helper I
Helper I

How can I reset an image when a form is submitted?

Hello, 

I followed these instructions Capture A Signature With Power Apps Pen Input And Save To SharePoint - (matthewdevaney.com) to have a signature show on an image from a pen input. I am submitting the form and am able to reset the pen input but cannot figure out how to reset the image when I submit the form. Any ideas? 

8 REPLIES 8
Carlosr
Microsoft
Microsoft

Hello @Techy1234 ,  

 

 

Reset(PenInput1);

 

 

Drop it in your Form's OnSuccess property.

Thank you for your quick answer. Does the onsucess field go into play when the form is submitted? The reason I am asking is because I have multiple parts of the form on one screen and I go through the form with the next button. 

Abhilash_Swain
Super User
Super User

Hi @Techy1234 ,

Please try below. 

select image control and 

Abhilash_Swain_1-1628260918999.png

 

UpdateContex({pic1:pen_Signature_Customer.Image})


on reset/ submission  UpdateContext({pic1:Blank()})

 

Thanks

Abhi

 

 

 

If you use SubmitForm, then on success will trigger if the record is saved successfully, otherwise OnFailure triggers.  If you are using Patch, then add the Reset after the Patch statement.

Thanks for your reply. When I type in the first part in image

UpdateContext({Diagram_3:Pen_Diagram.Image})

 

I am getting an error that behavior function is a non behavior property. 

 

For the second part, I have added that at the end on my submit button and it is still not clearing the image. 

Thanks. I tried it and it resets the pen signature but it doesn't reset the image that is reflecting the pen signature.

 

I have an image on my main form that when clicked on takes you to another screen where you do the pen input. Then once you click accept it takes you back to the form screen and there is an image that shows the signature/

 

In the image field of the image and I have pensig.image. I am able to reset the actual pen signature that is on the other screen but when that is reset it doesn't change the image on my main screen. 

Abhilash_Swain
Super User
Super User

Abhilash_Swain_0-1628262321642.png

 

Abhilash_Swain_1-1628262350172.png

Hope the screenshots will work for you. I have the image control 

Abhilash_Swain_2-1628262400125.png

Thanks

Abhi

Please give a thumbs up or accept as a solution if I answered your question.

Here you went wrong. Check the screenshots I shared.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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