Workflow Rule - Formula based on Picklist Item AND Date
I am having trouble with the syntax and keep getting various errors:
Cultivation_Code__c = A
TODAY()- (Last_Activity_Date__c) > 14
AND(ISPICKVAL(Cultivation_Code__c,"A", ((TODAY() - (Last_Activity_Date__c)) > 14) )
If it's not working let me know the error message.
Tried that, I get the following error: Error: Incorrect parameter type for operator '-'. Expected Number, Date, received DateTime
AND (ISPICKVAL(Cultivation_Code__c,"A"), TODAY() - DATEVALUE(Last_Activity_Date__c) > 14)
Let me know if it's working now
I would use a Trigger Criteria like
AND ( TEXT(Cultivation_Code__c) = "A", NOT(ISBLANK(Last_Activity_Date__c)) )and then add a Time-Dependant Action and schedule it 14 Days after the Last Activity Date
TODAY() is what's called a Relative Date value, today the TODAY() function will return 08/14/2019, tomorrow the TODAY() function will return 08/15/2019, the day after that the TODAY() function will return 08/16/2019...
Workflows and Processes only exvaluate the record when it is created/or edited and saved to the database, they will not automagically compare Last_Activity_Date__c to the current date and trigger on their own when the current date is 14 days after the Last_Activity_Date__c
Ok, so with your proposal, it will run and check everyday, and when the rules conclude to yes, it will create the task I am hoping for?
AND ( TEXT(Cultivation_Code__c) = "A", NOT(ISBLANK(Last_Activity_Date__c)) )is "start the clock" when the User creates or edits a record and saves it that meets the Criteria
if and when the clock strikes 14 days after Last_Activity_Date__c the Scheduled Action will happen.
If anytime before that the user edits the record and changes to Cultivation_Code__c to a value othe rthan "A" the Scheduled Action is cancelled.
Is a new Activity is added and the Last_Activity_Date__c is updated then Scheduled Action clock is reset and starting counting from 0 again