+ Start a Discussion
KimberlyJKimberlyJ 

Complicated validation rule using picklists and currency fields.

Hello,

I have a validation rule that works with 6 different fields. The fields are paired off, one currency field with a corresponding picklist.  Basically if there is a dollar amount in the currency field, then a value in the corresponding picklist needs to be chosen. The Product fields and the Support fields work exactly as they should... the Services fields do not.  The Services fields are special, as the formula stands, it will NOT allow a dollar amount in the Services field unless there are dollars in the Product field.  What I want to happen is

1) if there are dollars in the Services field AND

2) the Product field is empty

3) the Services picklist needs to be required.  

 

Otherwise, I don't need the services picklist to be required.  

 

Thanks!

 

AND(

DATEVALUE(CreatedDate) >DATE(2012,6,6),

OR(

AND(Services__c > 0, - currency field

ISBLANK(Product__c ), - currency field

ISNULL(Services_Product_Involved__c)), - picklist

AND(Support__c > 0, - currency field

ISNULL(Support_Vendors__c)), - multiple select picklist

AND(Product__c > 0, - currency field

ISBLANK(TEXT(Product_Manufacturer__c))))) - picklist 

 

Best Answer chosen by Admin (Salesforce Developers) 
KimberlyJKimberlyJ
AND(
DATEVALUE(CreatedDate) > DATE(2012,8,23),
OR(
AND(Services__c > 0, 
ISBLANK(TEXT(Product__c )),
ISBLANK(Services_Product_Involved__c)), 
AND(Support__c > 0, 
ISBLANK(Support_Vendors__c)),
AND(Product__c > 0, 
ISBLANK(TEXT(Product_Manufacturer__c)))))

All Answers

KimberlyJKimberlyJ
AND(
DATEVALUE(CreatedDate) > DATE(2012,8,23),
OR(
AND(Services__c > 0, 
ISBLANK(TEXT(Product__c )),
ISBLANK(Services_Product_Involved__c)), 
AND(Support__c > 0, 
ISBLANK(Support_Vendors__c)),
AND(Product__c > 0, 
ISBLANK(TEXT(Product_Manufacturer__c)))))
This was selected as the best answer
SteveMo__cSteveMo__c

That's a very nice formula Kim, where did you find it???  ;-D

KimberlyJKimberlyJ

You of course... as usual you rock.