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
Miguel Egas 7Miguel Egas 7 

Making a DATE field required based off a pick list value

Hi all, I am trying to create a validation rule to ensure a DATE field is populated if the pick list value of another field is set to certain value.  here is what I have and the error that I am getting:

AND(ISPICKVAL (Stage__c ="Scheduled"),ISBLANK(Scheduled_date__c =""))

Error: Error: Field Stage__c is a picklist field. Picklist fields are only supported in certain functions

 
Best Answer chosen by Miguel Egas 7
Arun Kumar 1141Arun Kumar 1141
Hi Miguel,

Refer to the below formula:
 
AND( ISPICKVAL( Stage__c , 'Scheduled'), ISBLANK( Scheduled_date__c ))

Hope this helps.
Thanks.​​​​​​​

All Answers

VinayVinay (Salesforce Developers) 
Hi Miguel,

You can try below validation.
AND(ISPICKVAL (TEXT(Stage__c ="Scheduled")),ISBLANK(Scheduled_date__c))
Please mark as Best Answer if above information was helpful.

Thanks,
Miguel Egas 7Miguel Egas 7

Thanks Vinay.  Something curious.  I received a second answer with a solution that worked from HARSH, although I can not find the post anymore:

Harsh (Customer Support) replied to your question at 11:45 AM on 8/18/2023.

Original question:
Hi all, I am trying to create a validation rule to ensure a DATE field is populated if the pick list value of another field is set to certain value.  here is what I have and the error that I am getting:

AND(ISPICKVAL (Stage__c ="Scheduled"),ISBLANK(Scheduled_date__c =""))

Error: Error: Field Stage__c is a picklist field. Picklist fields are only supported in certain functions

 

Reply:
Hi Miguel,
Try this formula, when you want the Scheduled date must have some value if the picklist selects Scheduled.

AND(ISPICKVAL(Stage__c, "Scheduled"),ISBLANK(Scheduled_date__c ))

Please mark it as Best Answer if the above information was helpful.


 

Arun Kumar 1141Arun Kumar 1141
Hi Miguel,

Refer to the below formula:
 
AND( ISPICKVAL( Stage__c , 'Scheduled'), ISBLANK( Scheduled_date__c ))

Hope this helps.
Thanks.​​​​​​​
This was selected as the best answer