Validation Rule for Multi select pick list - require fields to be completed upon selection - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Carolyn KaloCarolyn Kalo 

Validation Rule for Multi select pick list - require fields to be completed upon selection

I need to create a validation rule that requires 2 fields to be filled out upon selection of a specifc product in the multi select pick list. My pick list value is "Enterprise" and it is a product pick list. I have 2 custom fields that I would like to be required upon selection of "Enterprise". This is the formula that I have so far, and for whatever reason it is not working. Apprciate your help! I attempted this for one field, but ideally want both Contract_Value_Initial_First_Year__c  and Contract_Value_Recurring_Subscription__c required. 

AND(
INCLUDES( Product__c , "Responder Enterprise"),
ISBLANK( Contract_Value_Initial_First_Year__c )
)
Best Answer chosen by Carolyn Kalo
Tony TrinhTony Trinh
Hi Carolyn,

I see in your problem description you say the value is "Enterprise" and in your validation rule you have "Responder Enterprise." Which is it? Are you using the API Name of the picklist values?

The validation rule is syntactically correct.

All Answers

Tony TrinhTony Trinh
Hi Carolyn,

I see in your problem description you say the value is "Enterprise" and in your validation rule you have "Responder Enterprise." Which is it? Are you using the API Name of the picklist values?

The validation rule is syntactically correct.
This was selected as the best answer
Carolyn KaloCarolyn Kalo
Hi Tony, I was not using the API name and that solved it! Thank you! 
Carolyn KaloCarolyn Kalo
Hi Tony, how can I go about adding more fields to be required when the value "Enterprise" is selected? Now I would like the fields: Enterprise_Probability__c and Annual_Recurring_Subscription__c to be required. I may also need more fields required in the future, but am not sure how to add more? Appreciate your help! 
Tony TrinhTony Trinh
Hi Carolyn,

You can create separate rules for each field. This is recommended from a user standpoint because you can display the error right on the field.
AND(
INCLUDES( Product__c , "Enterprise"),
ISBLANK( Enterprise_Probability__c )
)
AND(
INCLUDES( Product__c , "Enterprise"),
ISBLANK( Annual_Recurring_Subscription__c )
)
If your fields are picklists, replace ISBLANK(Field__c) with ISBLANK(TEXT(Field__c))

You can consolidate into one rule, but you would not be able to display separate error messages because each rule only lets you select one location to display the error...but if you want to do it that way, here it is:
AND(
INCLUDES( Product__c , "Responder Enterprise"),
OR(
ISBLANK( Contract_Value_Initial_First_Year__c ),
ISBLANK( Enterprise_Probability__c ),
ISBLANK( Annual_Recurring_Subscription__c )
)
)
Carolyn KaloCarolyn Kalo
Thank you! That worked perfectly.