I've used similar strategies to what @chayce and @elazar described. And have found it useful to create "helper checkboxes" formulas, resulting in either true or false, which are super useful for debugging logic and building out reports showing a list of records that would've receive an email in this case. Checkout the Rem or Mod functions which are similar, but different for negatives (which may not matter in your use case).
For example, here are some fields ideas:
// Agreement Expiration Date (Type: Date)
// Use the calendar picker to specify a date on the front-end
// Agreement Expiration Date Countdown (Type: Formula Duration)
[Agreement Expiration Date] - Today()
// Agreement Expiration Date Countdown To Days (Type: Formula Numeric)
// Cast the Duration "Smart Units" to a number for consistency
ToDays([Agreement Expiration Date Countdown])
// Should Notify Management (Type: Formula Checkbox)
If (
// Check the box
// There is no remainder after dividing two numbers
// 30 is your "follow up frequency" interval
Rem([Agreement Expiration Date Countdown To Days], 30) = 0,
true,
// Default to unchecked box
false
)
You'd also want to omit records with an Agreement Expiration Date greater than 90 Days via your report filter criteria or in the Should Notify Management logic, something like:
If (
// Check the box
Rem([Agreement Expiration Date Countdown To Days], 30) = 0 and
[Agreement Expiration Date Countdown To Days] < 91,
true,
// Default to unchecked box
false
)
These example could be consolidated into a single formula to reduce the number of fields in the table, but it may help to at least keep the "countdown" as it's own field for testing and future maintenance! Hopefully that helps :)
------------------------------
Brian Seymour
------------------------------