Ask Search:
Jason TranJason Tran 

Validation rule - multiple fields

Need help writing validation rule for the following true statements

Picklist = value 1 or value 2 or value 3 
Stage = closed won

Make following open text fields required: 
Forecast Month 1 
Forecast Month 2
Forecast Month 3 
Forecast Month 4
Forecast Month 5
Forecast Month 6
Sunil KeshariSunil Keshari
Try this -

AND
(
OR(
ISPICKVAL(Pickup__c, "value1"),
ISPICKVAL(Pickup__c, "value2"), ISPICKVAL(Pickup__c, "value3")
),
OR(
ISBLANK(
Forecast_Month_1__c),
ISBLANK(Forecast_Month_2__c),
ISBLANK(Forecast_Month_3__c),
ISBLANK(Forecast_Month_4__c),
ISBLANK(Forecast_Month_5__c),
ISBLANK(Forecast_Month_6__c)
)
)
Karanraj SankaranarayananKaranraj Sankaranarayanan
He missed stage = closed won condition
 
AND(OR(ISPICKVAL(Pickup__c, "value1"), ISPICKVAL(Pickup__c, "value2"), ISPICKVAL(Pickup__c, "value3")), Stage = "Closed Won",OR(ISBLANK(Forecast_Month_1__c),ISBLANK(Forecast_Month_2__c),ISBLANK(Forecast_Month_3__c),ISBLANK(Forecast_Month_4__c),ISBLANK(Forecast_Month_5__c),ISBLANK(Forecast_Month_6__c)
)
Sunil KeshariSunil Keshari
Thanks Karanraj for pointing out. Here is the update formula -

AND
(
OR(
ISPICKVAL(Pickup__c, "value1"),
ISPICKVAL(Pickup__c, "value2"), ISPICKVAL(Pickup__c, "value3")
),
ISPICKVAL(Stage, "Closed Won"),
OR(
ISBLANK(
Forecast_Month_1__c),
ISBLANK(Forecast_Month_2__c),
ISBLANK(Forecast_Month_3__c),
ISBLANK(Forecast_Month_4__c),
ISBLANK(Forecast_Month_5__c),
ISBLANK(Forecast_Month_6__c)
)
)
Vikash GoyalVikash Goyal
OR(
ISPICKVAL(field__c,'value1'),
ISPICKVAL(field__c,'value2'),
ISPICKVAL(field__c,'value3'),
ISPICKVAL(stage,'closed won'),
ISBLANK(Forecast_Month_1__c),
ISBLANK(Forecast_Month_2__c), 
ISBLANK(Forecast_Month_3__c), 
ISBLANK(Forecast_Month_4__c), 
ISBLANK(Forecast_Month_5__c), 
ISBLANK(Forecast_Month_6__c),
)

Jason TranJason Tran
Thank you!