Location validation

Hey Team,

I’m trying to include a location validation in my Glide app.
Steps would be:

  • Employee is at the location of client
  • Validation between client’s location in system and employee’s location
  • If employee is at the client’s location, he’s able to start a shift

Is there any way to do this using Glide?

You can use the Distance column to calculate the Distance between a user’s current location and a fixed address. The user’s current location needs to be captured manually at a point in time (Glide can’t “follow” someone without them interacting with the Location component).

Once you know the Distance, you can control the visibility of a form button, for example, and only show the button when the Distance is less than a certain amount (like 1 mile, for example).

Yes I got there after a bit more research :slight_smile:

For anyone interested, there’s a great video here: Calculate distance in Microsoft Excel using latitudes and longitudes. - YouTube

I’d recommend using coordinates to calculate the distance

Glide already has a column to calculate distance for you live and in real time. You don’t have to do the math yourself. Just make sure you have a column with an address or a set of coordinates of the client. Then add a Distance column to compare that’s address/coordinates to your current location. Then you can set filters or visibility (such a visibility of a check-in button, based on the user’s distance to that location.

Glide’s solution is much simpler and doesn’t require you to use the location component, or any complex math. Just an address column and a distance column.

While it is technically true that you can’t track live coordinates of a user, the distance column will still work without having to use the location component to capture a user’s coordinates.