Validation to restrict Multi Picklist value to select only 1 option based on picklist selection


Here we are going to do validation on Case object. In this topic we will see how to restrict multipicklist value to choose only one option based on other picklist entry. Before proceeding you need to check your fields. Here we are using standard fields "Type" and two custom fields "Sub Type" and "Mult Option" for picklist. We check the combination of Type 'Mechanical' value and Sub Type 'Sub Mec 1' to restrict not to select more than 1 in multipicklist "Mult Option".


AND(  AND(ISPICKVAL( Type , "Mechanical"),
ISPICKVAL(  Sub_Type__c , "Sub Mec 1")), 
IF(Includes( Multi_Options__c,"Multi 1"),1,0)+
IF(Includes( Multi_Options__c,"Multi 2"),1,0)+
IF(Includes( Multi_Options__c,"Multi 3"),1,0)+
IF(Includes( Multi_Options__c,"Multi 4"),1,0)+
IF(Includes( Multi_Options__c,"Multi 5"),1,0) > 1 ) 


You can restrict one, two or more according to your need.

output

Reactions

Post a Comment

0 Comments