0

I need help with a Validation rule that basically says if Account Type = Customer, and you want to set Account Stage = On going, you have to make sure first that multi picklist field does not contain the value Do not Know

Is the formula so far, it doesn't work.

ISPICKVAL (Type, "Customer")
&&
ISPICKVAL(Stages__c, "On Going")
&&
NOT(INCLUDES(Multi_picklist, "Do not Know"))
0
0

How about this...

AND( ISPICKVAL(Type,"Customer"), ISCHANGED(Onboarding_Stages__c), ISPICKVAL(Onboarding_Stages__c,"On Going"),

AND(OR( INCLUDES(AB_Testing__c, "Do not Know")) etc etc etc

1

Validation rule trigger when the result is true, so you essentially have to list off every possible value:

ISPICKVAL(Type,"Customer") &&
ISPICKVAL(Stage__c,"On Going") &&
NOT(INCLUDES(Multi_Picklist, "Value 1")) &&
NOT(INCLUDES(Multi_Picklist, "Value 2")) &&
NOT(INCLUDES(Multi_Picklist, "Value 3")) &&
NOT(INCLUDES(Multi_Picklist, "Value 4")) &&
NOT(INCLUDES(Multi_Picklist, "Value 5")) &&
NOT(INCLUDES(Multi_Picklist, "Value 6")) ...

This would probably be better written in Apex, because at least in Apex, it's a simple string to compare to. Given the limitations of multi-valued picklists in Validation Rules, it's not particularly efficient to work with them for rules like this.

0

TEXT(Type) = 'Customer' && ISCHANGED(Stages__c) && TEXT(Stages__c) = 'On Going' && NOT(INCLUDES(Multi_picklist, 'Do not Know'))

1
  • IT didt work, now it doesnt let me save the record if I try to save the Multipicklist with anything other than Do not Know and don't have stage On Going selected, it gives me an error – kikalz Mar 24 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.