Loading...

We're setting up your new app...

Template

Geofencing

How to filter data by location

Industry: n/a
Function: Other
This app shows how to limit data based on the user's current location. We've got three views in this app: - a map view of all people - a map view of nearby people (within 5000km of the current location) - a form view In the form view, you can select from all people, nearby people, and nearby people with the color blue.
Loading...

How we built this app

This app has two tables: a Person table and a Form table. The Person table has a LatLong column that has the person's location in latitude/longitude coordinates. We added a virtual column called "Distance in km" that has the formula DISTANCE([LatLong], HERE()). That returns the distance in kilometers, between the Person and the app user's current location. We then created a Nearby Person slice with the condition [Distance in km] < 5000. This limits the data to just users who are nearby. Then, in our Form table, we added Ref columns to the Person table and the Nearby Person slice. For the "Nearby Blue Person" column, we added an additional constraint that [_THIS].[Color] = Blue, which further limits the selection.
This is a preview of the data sets used in the app.

Data

This is a high-level model of both the data entities and the UI elements in the app.
Loading...
Start for free