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
Gaurav Gulanjkar 19Gaurav Gulanjkar 19 

Multiselect to restrict one value

I have a requirement wherein there is a multi select picklist test__c which has 6 values a,b,c,d,e,f.

If I select "a", I cannot select any combination with "a" i.e ab,ac,ad,ae,af. How can I achive this with validation rule.
Best Answer chosen by Gaurav Gulanjkar 19
Akhil AnilAkhil Anil
Hi Gaurav,

Your validation rule formula will be like this
 
AND( 
INCLUDES( test__c  , "a"), 
OR( 
INCLUDES( test__c  , "b"), 
INCLUDES( test__c  , "c"), 
INCLUDES( test__c  , "d"),
INCLUDES( test__c  , "e"),
INCLUDES( test__c  , "f") 
) 
)

Kindly mark it as an answer if it works for you.

Hope that helps !

All Answers

Akhil AnilAkhil Anil
Hi Gaurav,

Your validation rule formula will be like this
 
AND( 
INCLUDES( test__c  , "a"), 
OR( 
INCLUDES( test__c  , "b"), 
INCLUDES( test__c  , "c"), 
INCLUDES( test__c  , "d"),
INCLUDES( test__c  , "e"),
INCLUDES( test__c  , "f") 
) 
)

Kindly mark it as an answer if it works for you.

Hope that helps !
This was selected as the best answer
Rakesh ARakesh A

If picklist has only a,b,c,d,e as values, then where can u select combinations?

I cannot select any combination with "a" -- Is this a other picklist field?