+ Start a Discussion

Validation rule - if one of many picklist values is selected, another field becomes mandatory HELP

I need to create several validation rules off the back of the same process - we have a picklist and we need to enforce that if A, B or C are selected from A, B, C, D or E, that another field on the page becomes mandatory. I cannot find any code anywhere to create this and am struggling with the CASE and ISPICKVAL functions. Can anybody help? Thanks so much,
You can put the value - None - (mark this as default) in all the picklists A B C D and E and then write a validation rule to check if the values in A, B & C are not equal to -None -  then another field cannot be blank using ISBLANK() check the value of this field you wish to be filled by user.

Read the formula explained on the link://success.salesforce.com/answers?id=90630000000h24rAAA

if the another field is Number, Date, DateTime, or  Picklist, you can use:


ISPICKVAL( Picklist__c , "A"),
ISPICKVAL( Picklist__c , "B"),
ISPICKVAL( Picklist__c , "C")),

ISBLANK( TEXT(AnotherField__c)))

if it is a text field, you can put Isblank(Anotherfield__c)

Thanks so much guys!
I would like to add that @Agi recomendation does work for Hierarchies as well :D
Kiran KadamKiran Kadam
If another field is Picklist. then what would be the solution?
I mean I want to make two fields mandatory from that two fields one field is of Text type and another is of Picklist type