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
bhanu_prakashbhanu_prakash 

i need to check when Zip code is updated

When i update zipcode matches i need to update field value as Category1, Category2, Category3

Category 1:
800,810,820,828,832,2000,2011,2015,2234,2250,2265,2267,2278,2280,2308,2315,2323,2327,2340,2444,2450,2452,2477,2489,2500,2534,2555,2579,2600,2618,2619,2621,2640,2641,2650,2651,2745,2774,2776,2785,2795,2830,2900,2914,3000,3207,3211,3216,3218,3228,3232,3234,3335,3341,3429,3690,3750,3752,3754,3755,3765,3767,3781,3796,3802,3810,3812,3910,3919,3926,3944,3975,3978,4000,4022,4030,4179,4205,4221,4223,4229,4280,4300,4306,4350,4500,4512,4516,4520,4550,4567,4572,4573,4575,4700,4701,4711,4740,4750,4751,4810,4815,4817,4818,4865,4868,4870,4878,4879,5000,5174,5231,5234,5240,5251,6000,6214,6229,6230,6232,6233,6280,6282,6284,6285,6330,6530,7000,7019,7021,7050,7055,7170,7172,7248,7250,7258,7277,7290,7300
Category 2:
835,836,870,2324,2326,2330,2333,2335,2350,2428,2430,2443,2445,2446,2456,2460,2464,2490,2535,2538,2541,2580,2680,2731,2738,2739,2800,3217,3230,3280,3350,3355,3356,3437,3438,3460,3461,3500,3501,3550,3556,3564,3630,3631,3691,3756,3757,3759,3761,3770,3775,3777,3840,3842,3844,4270,4272,4352,4370,4514,4521,4568,4570,4655,4670,4680,4703,4710,4720,4753,4802,4819,4877,4881,4883,5211,5214,5290,5355,5600,5608,5609,5719,6290,6450,6725,6726,7025,7173,7307,7310,7315
Category 3:
2360,2380,2400,2427,2431,2440,2447,2448,2454,2455,2463,2466,2470,2536,2537,2546,2548,2551,2582,2583,2594,2628,2630,2642,2643,2647,2710,2720,2790,2794,2850,2870,2880,3231,3249,3250,3300,3305,3331,3352,3357,3363,3377,3400,3431,3440,3442,3444,3450,3465,3585,3616,3620,3629,3636,3660,3672,3677,3730,3758,3764,3814,3816,3818,3820,3823,3825,3850,3875,3880,3909,3922,3980,3981,3995,3996,4285,4343,4405,4610,4650,4737,4800,4805,4807,4808,4816,4820,4821,4823,4825,4850,4860,4880,5201,5204,5252,5253,5255,5280,5291,5333,5341,5343,5345,5351,5354,5453,5501,5540,5554,5556,5558,5606,5607,5700,6225,6333,6401,6430,6432,6713,6714,6721,6722

I have tried this formaula


CASE(Zip_Code__c,800,810,820,828,832,2000,2011,2015,2234,2250,2265,2267,2278,2280,2308,2315,2323,2327,2340,2444,2450,2452,2477,2489,2500,2534,2555,2579,2600,2618,2619,2621,2640,2641,2650,2651,2745,2774,2776,2785,2795,2830,2900,2914,3000,3207,3211,3216,3218,3228,3232,3234,3335,3341,3429,3690,3750,3752,3754,3755,3765,3767,3781,3796,3802,3810,3812,3910,3919,3926,3944,3975,3978,4000,4022,4030,4179,4205,4221,4223,4229,4280,4300,4306,4350,4500,4512,4516,4520,4550,4567,4572,4573,4575,4700,4701,4711,4740,4750,4751,4810,4815,4817,4818,4865,4868,4870,4878,4879,5000,5174,5231,5234,5240,5251,6000,6214,6229,6230,6232,6233,6280,6282,6284,6285,6330,6530,7000,7019,7021,7050,7055,7170,7172,7248,7250,7258,7277,7290,7300,“Category1”,800,810,820,828,832,2000,2011,2015,2234,2250,2265,2267,2278,2280,2308,2315,2323,2327,2340,2444,2450,2452,2477,2489,2500,2534,2555,2579,2600,2618,2619,2621,2640,2641,2650,2651,2745,2774,2776,2785,2795,2830,2900,2914,3000,3207,3211,3216,3218,3228,3232,3234,3335,3341,3429,3690,3750,3752,3754,3755,3765,3767,3781,3796,3802,3810,3812,3910,3919,3926,3944,3975,3978,4000,4022,4030,4179,4205,4221,4223,4229,4280,4300,4306,4350,4500,4512,4516,4520,4550,4567,4572,4573,4575,4700,4701,4711,4740,4750,4751,4810,4815,4817,4818,4865,4868,4870,4878,4879,5000,5174,5231,5234,5240,5251,6000,6214,6229,6230,6232,6233,6280,6282,6284,6285,6330,6530,7000,7019,7021,7050,7055,7170,7172,7248,7250,7258,7277,7290,7300,“Category2”,2360,2380,2400,2427,2431,2440,2447,2448,2454,2455,2463,2466,2470,2536,2537,2546,2548,2551,2582,2583,2594,2628,2630,2642,2643,2647,2710,2720,2790,2794,2850,2870,2880,3231,3249,3250,3300,3305,3331,3352,3357,3363,3377,3400,3431,3440,3442,3444,3450,3465,3585,3616,3620,3629,3636,3660,3672,3677,3730,3758,3764,3814,3816,3818,3820,3823,3825,3850,3875,3880,3909,3922,3980,3981,3995,3996,4285,4343,4405,4610,4650,4737,4800,4805,4807,4808,4816,4820,4821,4823,4825,4850,4860,4880,5201,5204,5252,5253,5255,5280,5291,5333,5341,5343,5345,5351,5354,5453,5501,5540,5554,5556,5558,5606,5607,5700,6225,6333,6401,6430,6432,6713,6714,6721,6722,“Category3”,NULL)
But it showing synatx error, Please help me
Best Answer chosen by bhanu_prakash
BALAJI CHBALAJI CH
Hi Bhanu,

I think you cannot give a list of string to compare in formula field. You need to check each value individually like below.

CASE(AllContactsFolderId__c,
'800', 'Category1',
'810', 'Category1',
'820', 'Category1',
'828', 'Category1',
'835', 'Category2',
'836', 'Category2',
'870', 'Category2',
'2324', 'Category2',
'2360', 'Category3',
'2380', 'Category3',
'2400', 'Category3',
'2427', 'Category3',
NULL)

All Answers

BALAJI CHBALAJI CH
Hi Bhanu,

I think you cannot give a list of string to compare in formula field. You need to check each value individually like below.

CASE(AllContactsFolderId__c,
'800', 'Category1',
'810', 'Category1',
'820', 'Category1',
'828', 'Category1',
'835', 'Category2',
'836', 'Category2',
'870', 'Category2',
'2324', 'Category2',
'2360', 'Category3',
'2380', 'Category3',
'2400', 'Category3',
'2427', 'Category3',
NULL)
This was selected as the best answer
bhanu_prakashbhanu_prakash
Thank balaji, please ping me on skypeid bhanusunny73