I am trying to set a condition where that identifies if the time difference between a ticket being created and current time is greater than or equal to 4 hours. I have created the below expressions, but when I test the expression, I receive the Invalid Syntax - One of its operands is invalid error message.
In FreshService there’s a feature called Supervisor Rules.
It allows you to set and run events based on period of times.
As a matter of fact, there’s a standard condition called Hours since created:
You can perform then actions based on that.
Please be advised that this runs hourly, so, you should use additional conditions in order to ensure it runs once, unless desired.
Hope this helps.
Regards,
Hello,
I am trying to set a condition where that identifies if the time difference between a ticket being created and current time is greater than or equal to 4 hours. I have created the below expressions, but when I test the expression, I receive the Invalid Syntax - One of its operands is invalid error message.
Or if you are after something like @eeha0120 say you can use Supervisor Rules
Hello,
I am trying to set a condition where that identifies if the time difference between a ticket being created and current time is greater than or equal to 4 hours. I have created the below expressions, but when I test the expression, I receive the Invalid Syntax - One of its operands is invalid error message.
Hi @Justin.Harvey - @Daniel Söderlund has provided a simpler solution if you are trying to arrange a sequence of events (e.g. status change to pending, send reply to requester etc).
If, however, you are looking for the corrected expression, here you go! The unhelpful error you mention is almost always related to the wrong kind of quotes being placed around the values inside the expression.
Couple of things:
You can set Boolean as the output rather than an IF resolving to T or F.
I did some testing and unfortunately it appears as though this is a shortcoming of FS Expression node. DiffInHours will not accept a parameter in testing - always throws an error - if you switch to a fully expressed date then it will do the calculation.
Instead of trying to use eCURRENT_DATE_AND_TIME) I tried the functions NOW(timezone) or TODAY(timezone) and they also hit a wall bc we have no idea what FS will accept for timezone. We only have the 1 example ‘Asia/Kolkata’ and ‘London’ or ‘UTC’ or ‘GMT’ are not accepted which seems odd to me.
Hello,
I am trying to set a condition where that identifies if the time difference between a ticket being created and current time is greater than or equal to 4 hours. I have created the below expressions, but when I test the expression, I receive the Invalid Syntax - One of its operands is invalid error message.
Hi @Justin.Harvey - @Daniel Söderlund has provided a simpler solution if you are trying to arrange a sequence of events (e.g. status change to pending, send reply to requester etc).
If, however, you are looking for the corrected expression, here you go! The unhelpful error you mention is almost always related to the wrong kind of quotes being placed around the values inside the expression.
Couple of things:
You can set Boolean as the output rather than an IF resolving to T or F.
I did some testing and unfortunately it appears as though this is a shortcoming of FS Expression node. DiffInHours will not accept a parameter in testing - always throws an error - if you switch to a fully expressed date then it will do the calculation.
Instead of trying to use sCURRENT_DATE_AND_TIME) I tried the functions NOW(timezone) or TODAY(timezone) and they also hit a wall bc we have no idea what FS will accept for timezone. We only have the 1 example ‘Asia/Kolkata’ and ‘London’ or ‘UTC’ or ‘GMT’ are not accepted which seems odd to me.
Hi Bryn.
Regarding the timezones, they’re currently listed here: