+ Start a Discussion
Farhan NoorFarhan Noor 

Multiselect picklist validation rule

Need help to write a validation rule for multiselect picklist

For example Multiselect picklist Colour_c
Green
Blue
Orange
Red
So if user select one or more value from Colour_c the other picklist field shape_c become required

picklist Value shape_c
Square
Circle
Rectangular
Best Answer chosen by Farhan Noor
karthikeyan perumalkarthikeyan perumal
Hello, 

Use below formula,

Note: replace you multipicklist value in test,test1,test2,test,3,test4

AND( 
ISBLANK(TEXT(RequiredFieldPickListname)), 
OR( 
INCLUDES(multipicklistname, "Test"), 
INCLUDES(multipicklistname, "Test1"), 
INCLUDES(multipicklistname, "Test2"), 
INCLUDES(multipicklistname, "Test3"), 
INCLUDES(multipicklistname, "Test4") 

)

Hoep this will help you, 

Mark Best ANSWER if its work for you

Thanks
karthik


 

All Answers

karthikeyan perumalkarthikeyan perumal
Hello, 

Use below formula,

Note: replace you multipicklist value in test,test1,test2,test,3,test4

AND( 
ISBLANK(TEXT(RequiredFieldPickListname)), 
OR( 
INCLUDES(multipicklistname, "Test"), 
INCLUDES(multipicklistname, "Test1"), 
INCLUDES(multipicklistname, "Test2"), 
INCLUDES(multipicklistname, "Test3"), 
INCLUDES(multipicklistname, "Test4") 

)

Hoep this will help you, 

Mark Best ANSWER if its work for you

Thanks
karthik


 
This was selected as the best answer
Akhil AnilAkhil Anil
Hi Farhan,

Your formula will be simply like this
 
AND( 
ISBLANK(TEXT(Shape_c)), 
NOT(ISBLANK(Colour_c )) 
)

Hope that helps !

Kindly mark it as an answer if it works !
Farhan NoorFarhan Noor
Thanks karthikeyan  and Akhil
HARSHIL PARIKH AKA:GovindHARSHIL PARIKH AKA:Govind
I was just wondering on this but what if Colour_c is blank and there is value on Shape_c. Does it needs to be prevented as well?
If yes then we can try something like this:
OR(
             AND(
                                      NOT(ISBLANK(Colour_c )),
                                      ISBLANK(TEXT(Shape_c)
                         ),

              AND( 
                                    ISBLANK(Colour_c ),
                                     NOT(ISBLANK(Shape__c))
                         )
     )