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
OnCloud9OnCloud9 

Formula in workflow using priorvalue & not-null criteria

Greetings.  I tried looking this up but was unable to find a similar example.

 

I want a workflow to trigger if there's an update to a specific date field.  I'm using "ISCHANGED(datefield__c)" but that fires even if it's being populated for the first time (insert to field; rather than update to existing date).

 

I only want the workflow to trigger if the datefield__c has a date in it, and then getting updated.

 

Any help?  Thanks in advance!

 

-OnCloud9

Best Answer chosen by Admin (Salesforce Developers) 
OnCloud9OnCloud9

Woops!  Just added the NOT() syntax and it worked!  =)

 

AND( 
ISCHANGED( datefield__c ), 
NOT(ISNULL(PRIORVALUE(datefield__c))))

 

Thanks!  Are you the guy who loves Pliny?  That's my favorite brew too! 

All Answers

Steve :-/Steve :-/

You need to amend your Formula with a PRIORVALUE function to close the loophole

OnCloud9OnCloud9

Thanks.  I have this so far but it's not working..

 

AND( 
ISCHANGED( datefield__c ), 
ISNULL(PRIORVALUE(datefield__c)))

 

 

OnCloud9OnCloud9

Woops!  Just added the NOT() syntax and it worked!  =)

 

AND( 
ISCHANGED( datefield__c ), 
NOT(ISNULL(PRIORVALUE(datefield__c))))

 

Thanks!  Are you the guy who loves Pliny?  That's my favorite brew too! 

This was selected as the best answer