GPS Location automatically set when within x meters of coordinates

Hi All

I have seen numerous discussions around this but none seem to point to a solution

the above showed me that I must use the here() field to get a users gps coordinates

this showed me it was requested a few years back

but none seem to show how if a user is within let’s say 25 meters of location X, put their location as location X.

my previous job had an app where when you refreshed it logged you as being at that location automatically. so it must be possible somehow

am I missing something?

So you can use this to measure from where Here() reports you at to where the phones GPS says you are

But as with everything in Appsheet Distance() can only run when the user does something in Appsheet. So you could, in theory, set up Appsheet to check this for every add/edit/save/delete on all table records.

A better way to do this is to try and structure your App so the user has to do something when and where you want to check where they are. The main usage case for me is that we do a lot of timesheet systems. So we want them to clock in and out when the get to and leave site. I do this with two DateTime columns. Then next to each I have a Change Location column watching these. Finally a column to do the distance calculation between the Change Location column and the jobs LatLong location.

1 Like

I have done this, mainly as a proof of concept, and it works fairly well!! One additional thing I did is created custom actions for any View navigation. So even if they simply switched views, I was capturing their GPS location. It can take time to implement it all depending on the size of the app.

As @1minManager points out, unfortunately, any functionality built requires the user to actively use the app to trigger the updates including capturing GPS location. So try to build in some functionality that requires the user to utilize the app.

One last note…before the Google takeover there was a large push on AppSheet side to implement the automatic GPS location capture. With the Google takeover, it was put on hold. I have to think it is on their radar and I would think that since AppSheet is now in the hip pocket of Google, it would be even more possible to include.

Maybe the Community needs to provide a slight reminder we are still waiting for this??

EDITED: This feature request seems to have the most tracktion. Please place your vote here!

1 Like

Wow I’d like to know how to do that!

My gut feel on this is Appsheet/Google are avoiding this because of potential privacy and data protection issues.

you state that its between the phones gps and here, but if I have a column in my data table called locations, which has the google maps coordinates of a location, and then use HERE() and DISTANCE() to calculate the difference between the two coordinates, and if that is less than 25, would this work?

currently the location is only one place, but it could build to more, so it would need to search through all the values in the list, find the nearest one, and use that as the location.

I’m sure you probably already know. It’s just a matter of using the LINKTO…() functions in an action, then including that inside of a Grouped action. A second action in the group captures the GPS location using the HERE() function.

Anywhere you have the capability to specify an action for navigation, you would replace it with a Grouped action like that described above. This obviously would NOT include the Main or Menu views. But for any other navigation actions such as Row Selection behavior, buttons to views, replace system Edit button with a custom action, etc, … for any of those you can “intercept” the action and replace it with a Grouped action that will capture the GPS and then continue on to the desired view.

It can end up being a LOT of actions to cover all possible navigation points.

I would agree but there are so many apps out there that do it already - namely the maps apps which Google has. So it’s already been done many times over.


For this you’d need a virtual column against eac location that compares its distance to Here(). Then you could do a MIN(Select(… forumla to find the nearest

Yes, should work fine

Yeah but your’re not allowed to access any data from this regarding historic locations, metrics for different roads etc

Very good point!!

Honestly, I don’t know what the regulations are. I do know there are MANY apps that do capture similar data (think hiking, walking, biking apps) so I am not sure why AppSheet couldn’t do the same.