My application is to monitor emails from a backup system and generate tickets when there is a problem.
My logic updates two UDFs on the way through - ‘Date of last report’ and ‘date of last success’.
For some less critical clients, to reduce noise I want to generate an ‘error’ ticket only if the backup has failed for 2 or 3 days in a row, i.e. if ‘current date’ > ‘date of last success’ + 3.
Is there a way to do this?
This is something I have asked for as well. I’m not sure if it made it to the roadmap or not.
Just bumping this to see if Travis or anyone else has any thoughts.
I do this exact thing by setting an OldDate variable to {{date subtract=“2 days”}}
Then you can compare the date you extracted from the backup email to this date, etc…
Mark
April 20, 2026, 5:04am
5
A little more detail on the date math suggestion is available here
Admittedly it’s a little hacky but is tested and working with the only Addition and Subtraction functions available to us, Dates.
First render a custom.ZeroValue as {{date “0000-01-01 00:00:00”}}
Yes a year of 0000 does work, and we will use the years portion of the date as our numerical value.
To add a number, render custom.NumberDate as “custom.BilledHours years”, and then add them together with another render of {{date custom.ZeroValue add=custom.NumberDate}} saving the output to custom.Ru…
Thanks. I’ve generated a variable custom.errordate using your suggestion, but I can’t get the comparison against the last success date to work.
I’ve tried to do the comparison in “Only perform this action if…” with the expression:
(custom.client.UserDefinedFields.LastSuccess < “custom.errordate”)
I suspect I’m going about the comparison the wrong way.
Are you copying/pasting the Calculated Expression from this builder? Because there aren’t any quotes, etc…
Thanks. That was the problem. With the padlock symbol ‘open’ it generates the quotes. With the padlock closed it works correctly.