+ Start a Discussion
Vipin K 10Vipin K 10 

Multipick Validation Fails on Update

I have a multi-pick for which now we have added a validation rule to allow only single value. Validation rule as below. It's working for new record creation on Lead.  But does not work when we update an existing record.

On Update/Edit, it will allow more than one selection but saves it and keeps the first selection. But it will not throw the error.

Vaildation Rule:

AND(((IF(INCLUDES( Focus_Group__c,"Contact Us" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Mobile" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Telemarketing" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Social Media" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Services" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Web Form ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Customer" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Existing Account" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"End-User" ),1,0)) > 1), $User.Profile_Name__c != 'System Administrator')

Please suggest!
LBKLBK
Hi Vipin,

You are almost there.

Here is the validation rule with a minor change.
 
AND(((IF(INCLUDES( Focus_Group__c,"Contact Us" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Mobile" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Telemarketing" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Social Media" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Services" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Web Form ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Customer" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"Existing Account" ),1,0) 
+ IF(INCLUDES( Focus_Group__c,"End-User" ),1,0)) > 1), $Profile.Name <> 'System Administrator')
Hope this helps.