function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kayleigh.bates1.3951588830825535E12kayleigh.bates1.3951588830825535E12 

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,
Sonam_SFDCSonam_SFDC
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
AgiAgi
Hi,

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

AND(

OR(
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)


kayleigh.bates1.3951588830825535E12kayleigh.bates1.3951588830825535E12
Thanks so much guys!
@DBohrisch@DBohrisch
I would like to add that @Agi recomendation does work for Hierarchies as well :D
Kiran KadamKiran Kadam
@Agi
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