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
DUGLODUGLO 

I'm creating an account level formula field that returns true when an account has a particular billing state, like so:

CONTAINS("AL:AR:CA:FL:GA:IL:IN:KY:LA:MD:MI:MN:MO:MS:NC:NJ:NY:OH:OK:PA:SC:TN:TX:VA:WI", BillingState)

I only want this formula field to return true if the billing state is set to one of these values. After creating it though I noticed the formula field was returning true when billing state is blank. Does anyone know why this could be happening?
RD@SFRD@SF
Hi Dough,

I did some analysis and it seems the blank values are taken as valid. As a fix you can either use
1) Case
2) Update the formula to return false when the billing state is blank 
 
IF(ISBLANK(BillingState),FALSE,CONTAINS("AL:AR:CA:FL:GA:IL:IN:KY:LA:MD:MI:MN:MO:MS:NC:NJ:NY:OH:OK:PA:SC:TN:TX:VA:WI", BillingState))

Hope it helps
RD