function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Updating a custom field based on zip code criteria

Good Morning, All,


We currently use a custom forumula field called "Warranty Dispatch Provider" on our Accounts page to display the service provider that we need to dispatch for each specific account.  We base this off of the shipping state for each account.


Our formula is as follows:

IF(ISBLANK(ShippingState), "None",
IF(CONTAINS("AK:AZ:CA:HA:NV:NM:OR:UT:WA", ShippingState), "ABC Repair Company",
IF(CONTAINS("CO:ID:MT:KS:OK:TX:WY", ShippingState), "DEF Repair Company",
IF(CONTAINS("CT:ME:MA:NH:NY:PA:RI:VT", ShippingState), "GHI Repair Company",
IF(CONTAINS("AL:AR:DC:DE:FL:GA:KY:LA:MD:MS:NC:NJ:SC:TN:VA:WV", ShippingState), "JKL Repair Company",
IF(CONTAINS("IL:IN:IA:MI:MN:MO:NE:ND:OH:SD:WI", ShippingState), "MNO Repair Company", "Unknown"))))))


Our company has grown larger and we now need to start using Zip Code as the criteria instead of the State.  However, with 8,000 zipcodes for just one single repair company, our custom formula field is not feasible.


Does anyone have ideas on how we could implement and maintain a zip code based system?


Thank you in advance!

Amber NeillAmber Neill

While I haven't personally done this, it seems that you could use the first several digits of the zip in your formula.  That would decrease the sheer volume of possibilities.

This article might help you get started:

Good luck and let us know how it all pans out!




Thanks, Amber.  I will take a look. 


Our problem is that we have several service providers and some service provider territories might overlap.