Use case: If you require a 2-letter State abbreviation based on the full name of the State entered on the Prospect page, or vice versa.
1. Provides a 2-letter State abbreviation based on the full state name, otherwise gives you the value of what is entered in the State field on the Prospect.
Setup > Objects > Prospect > 'New' Custom Fields & Relationships
Field Type: Formula
Return Value: Text
Formula:
CASE(
i360__Home_State__c ,
'Alabama','AL',
'Alaska','AK',
'Arizona','AZ',
'Arkansas','AR',
'California','CA',
'Colorado','CO',
'Connecticut','CT',
'Delaware','DE',
'Florida','FL',
'Georgia','GA',
'Hawaii','HI',
'Idaho','ID',
'Illinois','IL',
'Indiana','IN',
'Iowa','IA',
'Kansas','KS',
'Kentucky','KY',
'Louisiana','LA',
'Maine','ME',
'Maryland','MD',
'Massachusetts','MA',
'Michigan','MI',
'Minnesota','MN',
'Mississippi','MS',
'Missouri','MO',
'Montana','MT',
'Nebraska','NE',
'Nevada','NV',
'New Hampshire','NH',
'New Jersey','NJ',
'New Mexico','NM',
'New York','NY',
'North Carolina','NC',
'North Dakota','ND',
'Ohio','OH',
'Oklahoma','OK',
'Oregon','OR',
'Pennsylvania','PA',
'Rhode Island','RI',
'South Carolina','SC',
'South Dakota','SD',
'Tennessee','TN',
'Texas','TX',
'Utah','UT',
'Vermont','VT',
'Virginia','VA',
'Washington','WA',
'West Virginia','WV',
'Wisconsin','WI',
'Wyoming','WY',
i360__Home_State__c )
2. Provides a full State name based on the 2-letter abbreviation, otherwise gives you the value of what is entered in the State field on the Prospect.
Setup > Objects > Prospect > 'New' Custom Fields & Relationships
Field Type: Formula
Return Value: Text
Formula:
CASE(
i360__Home_State__c,
'AL','Alabama',
'AK','Alaska',
'AZ','Arizona',
'AR','Arkansas',
'CA','California',
'CO','Colorado',
'CT','Connecticut',
'DE','Delaware',
'FL','Florida',
'GA','Georgia',
'HI','Hawaii',
'ID','Idaho',
'IL','Illinois',
'IN','Indiana',
'IA','Iowa',
'KS','Kansas',
'KY','Kentucky',
'LA','Louisiana',
'ME','Maine',
'MD','Maryland',
'MA','Massachusetts',
'MI','Michigan',
'MN','Minnesota',
'MS','Mississippi',
'MO','Missouri',
'MT','Montana',
'NE','Nebraska',
'NV','Nevada',
'NH','New Hampshire',
'NJ','New Jersey',
'NM','New Mexico',
'NY','New York',
'NC','North Carolina',
'ND','North Dakota',
'OH','Ohio',
'OK','Oklahoma',
'OR','Oregon',
'PA','Pennsylvania',
'RI','Rhode Island',
'SC','South Carolina',
'SD','South Dakota',
'TN','Tennessee',
'TX','Texas',
'UT','Utah',
'VT','Vermont',
'VA','Virginia',
'WA','Washington',
'WV','West Virginia',
'WI','Wisconsin',
'WY','Wyoming',
i360__Home_State__c)