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
kjunkjun 

validation rule on multiple fields involving a picklist

Hello, 

I have 5 text fields that are required to be completed when a certain picklist value is chosen. 

The picklist api field name and value are: 

present__c, Yes

the 5 text field api field names are: 

choice_A__c
choice_B__c
choice_C__c
choice_D__c
choice_D__c

Any suggestions or knowledge article I can be referenced to would be great too!
Best Answer chosen by kjun
Dhanya NDhanya N
Hi kjun,

Try this formula in validation rule and set the error message according to your requirement.
 
AND(ISPICKVAL( present__c , 'Yes'), OR(ISBLANK(choice_A__c), ISBLANK( choice_B__c ), ISBLANK(choice_C__c), ISBLANK(choice_D__c) ) )

Thanks,
Dhanya​​​​​​​

All Answers

Dhanya NDhanya N
Hi kjun,

Try this formula in validation rule and set the error message according to your requirement.
 
AND(ISPICKVAL( present__c , 'Yes'), OR(ISBLANK(choice_A__c), ISBLANK( choice_B__c ), ISBLANK(choice_C__c), ISBLANK(choice_D__c) ) )

Thanks,
Dhanya​​​​​​​
This was selected as the best answer
kjunkjun
Thank you Dhanya!