Ability to auto select nearest site

Hello, I have a quote that calculates pricing based on the depot the item is shipping from. In the past the user selects the depot and inputs a destination zip code and the system runs the mileage based on the distance between zip codes. We’d like the quote to now “automatically” select the NEAREST depot to the destination being entered (vs. selecting the depot) and then proceed with the regular calculations.

  • Calculations are from zip code to zip code so I have a US Zip Codes table already in use and have the geopoints for all the company’s depots in the depot table. (vir_depot_lat_long)
  • When the sales rep inputs the Destination Zip in the quote - I have a virtual field that determines the geopoint for the destination zip (vir_dest_latlong)

Now to determine the nearest Depot (Depot initial value), I created a virtual field in the quote but I’m getting the error below - can someone assist with the right expression?

1 20 1,027
20 REPLIES 20
Top Labels in this Space