Display County on Page Layouts

The Geopointe Geocoder automatically obtains the County for records it geocodes.  This is new, free information you get as a by-product of the geocoding process. What if you want to display that value on your main object?  One option is to use Workflow to copy the value from the Geocodes object to the master record.  Another option is to use formulas.  This is our personal recommendation because it acts like any other field and you get the added benefit of not needing to trigger your data to sync.

The geocoder will usually return the word County in the data (e.g. “Cook County”).  Since your label will likely be County, this is redundant.  Using the magic of Formula functions we can clean this up.  This is a formula you could use right now on your Accounts.

TRIM( SUBSTITUTE(geopointe__Geocode__r.geopointe__County_clean__c, “County”, “”) )

The County resides in a field on a related object.  For Accounts, that field is called geopointe__Geocode__r.geopointe__County_clean__c. We use the SUBSTITUTE function to remove the word “County” from the value.  We then wrap the whole thing with the TRIM function which will remove lead/trailing spaces.

Voila! We can see the County on the Account.