Ask Search:
Kaylin JendrewskiKaylin Jendrewski 

Validation Rule on Opp picklist

I am trying to create a validation rule where when a certain statge(s) are selected, a error message occurs when the MRR field is also blank.

Right now, I have written:

AND( 
ISPICKVAL(StageName,'Deep Dive Demo Scheduled'), 
ISBLANK(MRR__c))

However, when I try to add more rules for other stages, the rule breaks even with no syntax error.

How can I have this happen? Do I need to make multiple seperate validation rules for EACH stage?
Best Answer chosen by Kaylin Jendrewski
Girish NallamothuGirish Nallamothu
Hello ,

Try this 
AND(
OR( 
ISPICKVAL(StageName, "Stage A"), 
ISPICKVAL(StageName, "Stage B"), 
ISPICKVAL(StageName, "Stage C")
), 
ISBLANK(MRR__c)
)
 

All Answers

Girish NallamothuGirish Nallamothu
Hello ,

Try this 
AND(
OR( 
ISPICKVAL(StageName, "Stage A"), 
ISPICKVAL(StageName, "Stage B"), 
ISPICKVAL(StageName, "Stage C")
), 
ISBLANK(MRR__c)
)
 
This was selected as the best answer
Kaylin JendrewskiKaylin Jendrewski
Thank you!!
Steve MolisSteve Molis
You can also use a CASE Function like this
AND(
CASE(StageName, 
"Stage A", 1, 
"Stage B", 1, 
"Stage C", 1
0 ) = 1 , 
ISBLANK(MRR__c)
)