Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In Summer '16 Automatic Geocoding of data was released. Cool - but how do we use it, and why. 

...

Code Block
IF(NOT(ISBLANK(TEXT(ShippingStateCode))),TEXT(ShippingGeocodeAccuracy),TEXT(BillingGeocodeAccuracy))

Now What

So you want to know what to do with this magical Geocoding now? Well, I'm not even sure myself. I remember way back when maps first came out on Charts on Excel and they were so useless because they only worked for the US and they required too much data for them to work. So I think at that point I gave up on maps as a relevant feature. 

But I have clients now that do work in all countries of the world, and they want to know things about things, so I guess I'd better learn these things. 

So, is it useful to have a Distance from the head office of this country to this location? What would that mean even? If you don't have a tool like http://www.geopointe.com/ what would an as-the-crow-flies distance measurement even do for you? 

Distance

From the documentation. 

DISTANCE formulas are supported in:

  • Entry criteria for workflow rules and approval processes
  • Field update actions in workflow rules and approval processes
  • Custom validation rules
  • Lookup filters (in the Metadata API only)

So you can't use them in formulas. 

You have to use Formulas inside your workflows, not have them based on Criteria. 

Ooh this is an interesting one from the Developer docs

The DISTANCE function is fine for calculating the 10 stores closest to a customer’s current location. But don’t fuel your plane for a flight from San Francisco to Sydney based on it.

You can only calculate if a location is further away or closer to another location - not if it's equal to that location - I guess that makes sense because what even does equality mean when they could be in opposite directions away.