cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aliminate
Level: Powered On

Resetform issue

I created a form with a Button to get GPS coordinates (using the Location signal), and set the Default property of the text input control to use that variable. I set the button's OnSelect property:
UpdateContext({lat: Location.Latitude, lng: Location.Longitude})
And I set the Default property of the text input control to
lat & "," & lng
Then when I press the button the coordinates will be shown in the text input control. It works fine but my issue after I submit the form it wont reset the Location text input value. Thanks for any input.

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: Resetform issue

If you want to "clear" the text input after submitting the form, you can set this expression in the form's OnSuccess property:

UpdateContext({ lat: Blank(), lng: Blank() })

You may still have the ',' as part of the text input value. If this is not ok, you can change the expression in your button's OnSelect to

UpdateContext({ latlng: Location.Latitude & "," & Location.Longitude })

Set the Default property of the text input to 'latlng', and on the OnSuccess you can clear that variable:

UpdateContext({ latlng: "" })

Hope this helps!

View solution in original post

2 REPLIES 2
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: Resetform issue

If you want to "clear" the text input after submitting the form, you can set this expression in the form's OnSuccess property:

UpdateContext({ lat: Blank(), lng: Blank() })

You may still have the ',' as part of the text input value. If this is not ok, you can change the expression in your button's OnSelect to

UpdateContext({ latlng: Location.Latitude & "," & Location.Longitude })

Set the Default property of the text input to 'latlng', and on the OnSuccess you can clear that variable:

UpdateContext({ latlng: "" })

Hope this helps!

View solution in original post

aliminate
Level: Powered On

Re: Resetform issue

It worked great.  Thank you

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,680)