Can MSPI do basic maths?

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…

A little more detail on the date math suggestion is available here

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.