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
JulieGJulieG 

Need help on date validation rule!

Hi, I'm having some trouble with a date validation rule - what I want to have happen is, if a user selects "Declined" on the Negotiation Status field, I want them to enter the "Declined Date", which is a date field.  Below is my formula and I'm getting an error notice, also below.  It looks like that because the Declined Date is a date field, but the system wants text??  I'd appreciate any suggestions....Thanks.
 

Error: Incorrect parameter for function =(). Expected Date, received Text

AND(
ISPICKVAL(Negotiation_Status__c , "Declined" ), Declined_Date__c
 = ""
)

MSheridanMSheridan
Try this instead:

AND(
ISPICKVAL(Negotiation_Status__c , "Declined" ), NOT(ISNULL(Declined_Date__c)))
JulieGJulieG
Thanks so much for the reply.  I put this into production and  received no syntax errors, but when testing it out an inputting the Neg. Status as Declined, when trying to save without inputting a Declined Date, I do not get an error message asking me for the date.  For some reason the rule isn't working......  How can that be possible if there are no syntax errors? 
MSheridanMSheridan
Sorry, I thought you wanted the Date field not to be blank for the rule to trigger. Remove the NOT and just leave the ISNULL. That should trigger the rule.
JulieGJulieG
Whoo-hoo!  That did it!!  Thank you so much!!