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
FQuinonesFQuinones 

How to create a validation rule with a picklist field and a multiple select field?

Hello All, 

I'm trying to create a validation rule for the field Ethnicity (picklist) and Cultural Identify (Multi-select picklist). Every time Ethnicity equals "Hispanic or Latino", I want to required the field Cultural Identity. 
I was thinking in somehting like the following: 

AND
(ISPICKVAL(Ethnicity__c,"Hispanic or Latino")&& 
ISBLANK(TEXT(Identify_as__c))
)

Error: Field Cultural Identity is a multi-select picklist field. Multi-select picklist fields are only supported in certain functions.

Can someone help? 
Best Answer chosen by FQuinones
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Can you use the below validation rule.
 
AND
(ISPICKVAL(Ethnicity__c,"Hispanic or Latino"), 
ISBLANK(Identify_as__c)
)
Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
 

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

For multiselect picklist you have to use INCLUDES() function as below.

 
AND
(INCLUDES(Ethnicity__c,"Hispanic or Latino")&& 
ISBLANK(TEXT(Identify_as__c))
)

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
 
FQuinonesFQuinones

Hello Sai, 

Thank you for your quick response. I try that too and did not work. 
The error is the following: 

 Field Ethnicity__c is a picklist field. Picklist fields are only supported in certain functions 
 

Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Can you confirm if Ethnicity__c is Picklist or multiselect picklist and also can you confirm the API name of the value "Hispanic or Latino".

Thanks,
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Can you confirm if Ethnicity__c is Picklist or multiselect picklist and also can you confirm the API name of the value "Hispanic or Latino".

Thanks,
 
FQuinonesFQuinones
Hi, 
Confirmed.
Ethnicity(Ethnicity__c) is a picklist and the API name of the value is "Hispanic or Latino". Cultural Identity (Identify_as__c) is a multi-select picklist. 
Thank you.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Can you use the below validation rule.
 
AND
(ISPICKVAL(Ethnicity__c,"Hispanic or Latino"), 
ISBLANK(Identify_as__c)
)
Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
 
This was selected as the best answer
FQuinonesFQuinones
Sai, 
That works. Thank you. 
sam ramysam ramy
Dumpscollection Questions and Answers are packed with  the most reliable and genuine study material that helps you understand each and every topic of the syllabus.