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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,520)