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
Terry_0101Terry_0101 

Do I need 10 or just 1 validation rule

How to make a DATE field required if a picklist value has been selected?

How to make this apply to 10 separate picklist fields with its own separate 10 DATE fields?

Or, do I need 10 validation rules for each field?
Dario BakDario Bak
Hi Samantha, I think this is what you are looking for:

1 validation per field:
AND( 
   ISPICKVAL( StageName , "Open"), 
   ISBLANK( DateField )
)

1 validation for all:
 
OR( 
  AND(
     ISPICKVAL( StageName1 , "Open"), 
     ISBLANK( DateField1 )
   ),
  AND(
     ISPICKVAL( StageName2 , "Open"), 
     ISBLANK( DateField2 )
   ),
  AND(
     ISPICKVAL( StageName3 , "Open"), 
     ISBLANK( DateField3 )
   )
)

I suggest you use 1 per field... It's more work but you will be able to show an accurate error message. Believe me, end user will ask for more detail if you can't tell in the error message which field is wrong.

If you liked my answer please choose as best response!

May the force.com be with you!