Creating a PB that will update a checkbox on the Lead to True if, 1) Status = Completed (this is done) 2) Due Date is within the last 30 days.

When I try to create a formula for that and use LAST 30 DAYS in the PB it doesn't work, I get an error: "The formula expression is invalid: Syntax error. Found 'LAST'".

How do I create this PB so that it can check to see if there is a task that has been completed in the last 30 days (using the due date, not last modified date or created date)


You'll want to use the built-in DateTime function TODAY(), and then simply subtract 30 from it. Thus your formula for the Due Date field would be DueDate >= the following:

TODAY() - 30
  • That's not working. I have Due Date formula equals TODAY() - 30. – goldk May 11 '18 at 20:05
  • Also, will that prevent it from being marked as true if it's 45 days in the past? I need it within a range of the last 30 days. – goldk May 11 '18 at 20:06

You can't do relative date functions like "LAST 30 DAYS" but you can do math on the field somenthing like that

TODAY() - 30
  • So I won't be able to get a date range like last 30 days? My concern is that if there is a task from 300 days ago it will also mark as true since it technically meets the criteria. – goldk May 11 '18 at 20:08

This is what I got folks.

AND( ActivityDate >= Today() - 30, ActivityDate < Today()+ 1 )

Makes sure it isn't greater than 30 days ago and because you can put the due date in the future, it doesn't mark as TRUE if it's greater than today.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.