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
LaaralLaaral 

Formula for date-field update

I need some help with my workflow rule formula. Idea is when this Installation Completion date is once set and if someone changes the date after that I'll get an email alert that this field is updated.

Now I've made the email templates,alerts and started working on my workflow rule and this is what I've come up :

AND(ISCHANGED(Installation_Completion_Date__c))

and evaluation criteria is : Evaluate the rule when a record is created, and every time it’s edited

but I'm not sure how to put this part that alert goes off only when it has a date(old value) and the date changes(new value). Now whenever I put date to the field (even when I set the value for the first time) it sends me the email. 

Best Answer chosen by Laaral
AgiAgi
Hi,
you can try:
AND(ISCHANGED(Installation_Completion_date__c),
NOT(ISBLANK(PRIORVALUE(Installation_Completion_date__c))))

All Answers

Satish_SFDCSatish_SFDC
You can use a functionn PRIORVALUE to get the old date and then compare it with the current value.

Regards,
Satish Kumar
LaaralLaaral
AND(PRIORVALUE(Installation_Completion_Date__c),
ISCHANGED(Installation_Completion_Date__c)
)
I tried putting the PRIORVALUE but it gives me this : Error: Incorrect parameter type for function 'AND()'. Expected Boolean, received Date, so what should I do? I can'y change date field to text.
AgiAgi
Hi,
you can try:
AND(ISCHANGED(Installation_Completion_date__c),
NOT(ISBLANK(PRIORVALUE(Installation_Completion_date__c))))
This was selected as the best answer