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

Reset Latitude and Longitude

I scan a QR code and add the Latitude and Longitude to a collection along with the data from the scan. This works fine. However, if I then do another scan in a different location, the data is updated but the latitude and longitude is not. How do I reset the latitude and longitude so subsequent scans will return the correct co-ordinates?

To clarify I have
Set(setLat, Location.Latitude);
Set(setLong, Location.Longitude);
in the OnSelect button if variables are empty and in the OnScan if scanning a QR code.

setLat and setLong are then put into a collection.

1 ACCEPTED SOLUTION

Accepted Solutions
murray7
Frequent Visitor

Resolved. It appears to be a timing issue. I had Enable(Location) just before grabbing the co-ordinates and Disable(Location) immediately after. This was repeated on each OnScan. By removing the Disable(Location) until after all locations had been uploaded, the system works.

View solution in original post

1 REPLY 1
murray7
Frequent Visitor

Resolved. It appears to be a timing issue. I had Enable(Location) just before grabbing the co-ordinates and Disable(Location) immediately after. This was repeated on each OnScan. By removing the Disable(Location) until after all locations had been uploaded, the system works.

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.

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 (4,668)