Use GPS proximity searching
Location fields can be used to capture the GPS coordinates of assets or locations. Users sometimes need to view a list of items closest to them. Using a location field with a view filter allows users to see nearby assets/locations.
Example 1
A store auditor that performs audits in different areas each day is not always familiar with all of the stores in the area. The store list already contains the GPS locations of all stores. The auditor is able to view a list of stores within walking distance.
Instructions
- Customize the application containing records with GPS coordinates (e.g., Store List)
- In the Views section, create a new view
- Specify an appropriate view name (e.g., Nearby Stores)
- Select the data the user should see when viewing the list (e.g., Store Name, Store Address)
- Click on the ‘Filter' tab, then ‘Add Condition'
- Update the new condition to indicate records where the GPS location is located less than an appropriate distance away from the user (e.g., Store Location, Located Less Than 1km)
- Save the view
- Publish the application
Example 2
The same store auditor from Example 1 would like to be able to select which distance to use for filtering nearby stores.
Instructions
- Follow steps 1-4 in Example 1
- In the View section, click the Parameters tab, then the 'Add parameter' button
- Name the parameter and select 'Distance field' as the field Type. Set the other field properties such as default Value, Units, Max value, etc.
- Click on the ‘Filter' tab, then ‘Add Condition'
-
Update the new condition so that the location field (Store Location) is located less than the parameter that you created in Step 3 (Distance to Nearby Stores)
- Save the view
- Publish the application
Note:
On a mobile device, the user will be able to adjust the filter distance using an interactive slider.