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
thuskerthusker 

More Validation Rule Help Needed - validate against multiple multi-select values

I'm struggling with another validation rule.  We have a picklist where the sales reps indicate if it's a standard discount or not.  Then there is a multi-select picklist where they indicate the particular type of discount they are asking for.  I want to have a validation rule that says "If the Standard Discount field = Yes, then the Discount Type field can't have certain options selected.  I have figured out how to do a rule to error out checking for one value in the multi-select list.  But I can't seem to figure out how to check multiple options with one rule (I'd rather not have 10 separate rules if it can be done with one).

 

Here is my example which successfully creates an error if the Stadard Discount = Yes and then the Discount type includes "Rebate":

 

OR(
AND(ISPICKVAL( Standard_Discount__c , "Yes"),
INCLUDES(Discount_Type__c, "Rebate")))

 

 

So how do I take this rule and give an error if the Discount Type also includes "Trade In" or "Certification" or "Credit Return" etc.?

 

 

thuskerthusker

Hey, I think I figured it out--guess I was having a "parenthetical issue" when I tried to add more conditions.  I'm pretty bad at formulas, though, so this stuff comes with great difficulty sometimes:

 

OR(
AND(ISPICKVAL( Standard_Discount__c , "Yes"),
INCLUDES(Discount_Type__c, "Rebate")),
AND(ISPICKVAL( Standard_Discount__c , "Yes"),
INCLUDES(Discount_Type__c, "Trade In")),
AND(ISPICKVAL( Standard_Discount__c , "Yes"),
INCLUDES(Discount_Type__c, "Credit Returns")),
AND(ISPICKVAL( Standard_Discount__c , "Yes"),
INCLUDES(Discount_Type__c, "Special Credit Terms")))