You need to sign in to do that
Don't have an account?
grandak koy
Workflow to Fire when Date changes to previous Month?
How can I set off a field update when a date's month changes to the previous month?
Ex. if the date is 5/1/2018, and it changes to 4/2018, i need a field to update. I currently have this:
AND(
ISCHANGED(Date__c),
date__c < (PRIORVALUE(date__c) - 30)
)
Ex. if the date is 5/1/2018, and it changes to 4/2018, i need a field to update. I currently have this:
AND(
ISCHANGED(Date__c),
date__c < (PRIORVALUE(date__c) - 30)
)
Please try
AND(
ISCHANGED(date__c ),
MONTH( PRIORVALUE(date__c ) ) > MONTH(date__c )
).
Please mark this as the best answer if it resolves your issue.
Note :- The field should be of Date type. If it is datetime user DATAVALUE() first and then use the above mentioned formula.
AND(
ISCHANGED(date__c ),
PRIORVALUE(Month(Datevalue(date__c )))) > MONTH(Datevalue(date__c ))
it says incorrect arguement type for function priorvalue
Thank you for your inputs.
Hi Grandak,
If it has to be a declartive approach, create one formula field and then get the dateValue of the datetime field and store it as date type.
Then use that field in the above formula.
If programmatic approach is an option you can go with it as well.
If it a formula it will not work ..
Can I see what you wrote to trigger it?
Please refer the below screenshot.
I Created a Datetime field ttt__c.
I Created a formula field fff_c of type date and got the value using DATAVALUE(ttt__c).
Created a workflow with the rule criteria as below. Please let me know if it helps.