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
emitincemitinc 

How do I validate no null value in 8 different pick-list fields?

I am trying to create a validation rule that will do the following when saving an Opportunity:

 

IF Stage is saved to Closed

 

THEN Check 8 different pick-list fields. If ANY of those 8 pick-list fields are blank then do not allow user to save Opportunity as Closed

 

What is the syntax for this validation rule?

 

Thank you for your help!

blueflame121blueflame121

You can implement the below logic here for example Type and Leadsource is taken.

 Within the OR login you can validate your all 8 picklist . 

 

IF 

AND (ISPICKVAL( StageName,'Closed Won'), 
OR ( ISPICKVAL(Type,'' ) , ISPICKVAL( LeadSource ,''))) 
, true, false 


)

emitincemitinc

I've used the following syntax 

 

IF
(
AND (ISPICKVAL( StageName,'Closed Won'),
OR ISPICKVAL( Server_Folder_Created__c ,'') , ISPICKVAL( Salesforce_Invoice__c ,'')))
, true, false

)

 

But keep getting a "Syntax error. Found 'OR'" error.

 

Any ideas? 

blueflame121blueflame121

Yes friend you have missed out one left braket

use this one 

 

IF
(
AND (ISPICKVAL( StageName,'Closed Won'),
OR (ISPICKVAL( Server_Folder_Created__c ,'') , ISPICKVAL( Salesforce_Invoice__c ,'')))
, true, false

)

emitincemitinc

Thank you, that works!

blueflame121blueflame121
Please mark the post as resolved with appropriate answer , thanks