When configuring Record Sets to be included in the Axsy Mobile App's sync scope, any object that includes a Geolocation field can have distance-based conditions included as part of the Record Set's query filters.

Please see the following article for more general information on configuring a Record Set's query details: Configure Query Details

Adding a Distance-Based Condition

When adding Filter Conditions to a Record Set, if the object for the Record Set includes a Geolocation field, the pop-up for defining the filter will include a tab labeled "Distance". 

NOTE: The "Distance" tab will not be displayed for objects that don't have a Geolocation field.

Selecting the "Distance" tab will present the user with the following parameters which they can configure and save:

Location FieldDropdown whose values include all Geolocation fields available for the object being configured.
GeolocationThe query will calculate the distance between an object's Location Field and the geolocation coordinates defined here.

The value must be in the format: GEOLOCATION(<latitude>,<longitude>)
...where <latitude> and <longitude> should be replaced by hard-coded values.
MeasurementUnit of measurement to use for the query. Options are "kilometres" or "miles".
OperatorDistance operator to use for the query. Options are "less than" or "greater than".
ValueNumeric value to use with the distance query. In other words, the number of kilometres or miles against which the distance is being compared.

When adding filter conditions, objects that have one or more Geolocation fields will have a "Distance" tab for adding distance-based conditions

After setting the required parameters and selecting Done, the condition will be added to the Record Set's query details where it can be optionally combined with additional conditions.

In the example screenshot below, the object being synced has a custom Geolocation field with API Name Location__c, and the added condition means only records that have a Location__c that is less than 1 kilometre from the geo-coordinates 43.66935680876944,-79.38966498668636 will be synced.

Example of a distance-based condition added to the Record Set's query details.


Currently, the Geolocation parameter, i.e. the coordinates against which an object's Geolocation field is compared, only supports hard-coded values for latitude and longitude. Support for instead using a second Geolocation field for the distance calculation will be added in a future release.