How to Set Up a Distance Search

 

This article describes how to set up Distance Search in a DataPage.  First of all, you need to have Distance Search enabled for your account. Learn more about enabling Distance Search.

When enabling Distance Search, Caspio will also upload a USA Zip Codes reference table for you to use as a lookup. Caspio also provides updates to the USA Zip Codes table on a quarterly basis.

How to implement?

1.  Create a Report DataPage.

You can select Search type to be either Search Form or Pre-defined criteria. Then on the Select Search Fields screen select either Distance Search by Zip/Postal Code (Search based on Zip code) or Distance Search By Coordinates (Search based on Latitude and Longitude).

Select Search Criteria

Note: You can also include any other fields you want for the Search Criteria.

2.  Configure the Search Fields.

In a Distance Search, you can search based on geocodes or Zip codes. If the data source includes geocoded data, choose the First Option “My data is geocoded” in the General Options section and select the relevant field for the Latitude and Longitude data from the dropdown. Otherwise select the Second radio button “Determine via Postal Code”. In the Geocode Reference section you can either set the lookup table from Caspio or you can set any other look up table that includes Postal Codes, Latitude and Longitude. In the Additional Options section, you can set the Distance units as Miles or Kilometers.

Configure the Search Fields

3.  Configure the “Center of Search”.

If the Search is based on Zip Codes the Center of the search would be a Zip Code. You can also configure the “Distance” field.

Configure the Center of the Search

Configure the Distance

If the Selection Criteria is based on Coordinates then the search would have a “Center Latitude” field and a “Center Longitude” field. They can be configured based on the requirements of your application.

Center Configuration with Longitude and Latitude

4. Continue the DataPage wizard and configure the Results and Details pages as normal.