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

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
Highlighted
Power Apps
Power Apps

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
Highlighted
Power Apps
Power Apps

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

Highlighted
Frequent Visitor

Re: Resetform issue

It worked great.  Thank you

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,907)