1

I'm working on creating a validation rule where I have:

  • Multi-Select-Picklist (multi_select_picklist__c)
  • Text field (other_explanation__c)

The rule is: If the user selects Other from multi-select pick list then other_explanation__c is required to enter.

I have attempted to do something like this:

AND(ISPICKVAL(Status, 'Career Advisor - Inbound'), 
AND(ISPICKVAL(multi_select_picklist__c != 'Other')), ISBLANK(other_explanation__c)
OR( 
    $Profile.Name == "Administrator", 
    $Profile.Name =="Super User" 
  ) 
)

1 Answer 1

2

You can't use multi-select picklists with ISPICKVAL. Instead, you need to use INCLUDES. The Documentation describes its use as follows:

INCLUDES(multiselect_picklist_field,text_literal) and replace multiselect_picklist_field with the merge field name for the multi-select picklist; and replace text_literal with the multi-select picklist value you want to match in quotes.

So your formula should look something like this:

AND(
 $Profile.Name = 'System Administrator',
 ISPICKVAL(Status, 'Career Advisor - Inbound'),
 ISBLANK(other_explanation__c),
 INCLUDES(multi_select_picklist__c, 'Other')
)
6
  • one question can you use $Label in the Validation rule? instead of hard-coding the value, developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/…
    – Nick
    Jan 5, 2017 at 22:22
  • Not in validation rules that I know of. Jan 5, 2017 at 23:24
  • Yes the $Label global variable is accessible within Validation Rules.
    – Adrian Larson
    Jan 5, 2017 at 23:54
  • @Adrian: I have tried it for the multi-select got this error Error: Incorrect parameter type for function 'INCLUDES()'. Expected Text Literal, received Text
    – Nick
    Jan 6, 2017 at 1:33
  • INCLUDES(multi_select_picklist__c, $Label.Other)
    – Nick
    Jan 6, 2017 at 1:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .