Trying to utilize a picklist value to modify a territory assignment identified by state.
My original formula, very simple:
IF(LEN( {!State})=0, "None",
IF(CONTAINS("AK:AZ:CA:HI:NV:NM:OR:UT:WA", {!State}), "West",
IF(CONTAINS("CO:ID:MT:KS:OK:TX:WY", {!State}), "Central",
IF(CONTAINS("CT:ME:MA:NH:NY:PA:RI:VT", {!State}), "East",
IF(CONTAINS("AL:AR:DC:DE:FL:GA:KY:LA:MD:MS:NC:NJ:SC:TN:VA:WV", {!State}), "South",
IF(CONTAINS("IL:IN:IA:MI:MN:MO:NE:ND:OH:SD:WI", {!State}), "North", "Other"))))))
Now I need to put in a modifier by way of a picklist field that says if the Industry value = Retail
then it will utilize a different model for territory assignment, example:
IF(CONTAINS("AK:AZ:CA:HI:NV:NM:OR:UT:WA", {!State}), "West",
IF(CONTAINS("IL:IN:IA:MI:MN:MO:NE:ND:OH:SD:WI:CO:ID:MT:KS:OK:TX:WY:AL:AR:DC:LA:MD:MS", {!State}), "Central",
IF(CONTAINS("CT:ME:MA:NH:NY:PA:RI:VT:DE:FL:GA:KY:NC:NJ:SC:TN:VA:WV", {!State}), "East", "Other")))
I am having trouble adding the picklist modifier due to errors return results. Can Someone offer some assistance?
EDIT : here's the different versions I tried and the errors
Version 1
AND( ISPICKVAL(Industry,"Retail"),
CONTAINS(CASE("IL:IN:IA:MI:MN:MO:NE:ND:OH:SD:WI:CO:ID:MT:KS:OK:TX:WY:AL:AR:DC:LA:MD:MS", State),
"Central", "None"))
Error: Incorrect number of parameters for function 'CASE()'. Expected 2, received
Version 2
AND( ISPICKVAL(Industry,"Retail"),
CONTAINS ( TEXT("IL:IN:IA:MI:MN:MO:NE:ND:OH:SD:WI:CO:ID:MT:KS:OK:TX:WY:AL:AR:DC:LA:MD:
MS", State), "Central", "None"))
Error: Incorrect number of parameters for function 'TEXT()'. Expected 1, received 2