Skip to main content

Hello Everyone

 

I have not tried using the Expression builder yet, but I have an urgent request from the company to build an escalation on our Offboarding tickets. I just need to do a check to see if the offboarding Date = Today and if true send an escalation email to the assigned manager and agent. I have the ISO date placeholder, but I have no idea how to build the expression. AI was not able to assist me, so I am now asking the champs lol 🙂

 

 

 

 

 

 

Not sure if there is a “todays” date. there is a today’s date and time.. but mot helpful…

 


I have not used expression builder either, but I do that exact thing using a PowerShell node


Hello @Fredericjvr you could try something like this that takes your iso value and converts it to a DateValue and then compares it to a date value of “Today”. The today value outputs a simple date (ex. 2023-11-13) Just make sure to set it for your time zone. You can output a string, number, or boolean from the if statement. Whichever makes the most sense for you. Hope this helps!

 


Hello @Fredericjvr you could try something like this that takes your iso value and converts it to a DateValue and then compares it to a date value of “Today”. The today value outputs a simple date (ex. 2023-11-13) Just make sure to set it for your time zone. You can output a string, number, or boolean from the if statement. Whichever makes the most sense for you. Hope this helps!

 

Thanks will try and let you know :)


Hi @Fredericjvr - this Expression from @zachary.king will work for you but there is a massive problem using this parameter TODAY(‘Asia/Kolkata’)

 

There is no list anywhere to find the names of the time zones according to Fresh Works.

 

 

I created a similar expression but using DiffinDays() ** but I cannot test anymore due to a bug so I’m optimistic this will work but not sure.

**P.S.  I reported this apparent bug where I can no longer test Expression properly anymore bc the Test Expression function doesn’t “see” the name of the field being tested but always defaults to {{ticket.id}} 

Anyway, aside from this one shown in the Help Guide (Asia/Kolkata) - only “GMT” or “UTC” work and nothing else.  I tried now(‘UTC’) and now(‘GMT’) and those both worked and you can use either Date or Datetime as output options or as above with the Boolean output.

However, none of these were accepted:

“Eastern”, “Eastern Time”, “New York”, “Harare”, “Eastern Time (US & Canada)” as shown on the Contact page, “IST”, “India Standard Time” so on and so on with no luck.

@Kamakshi V could the FS team get this list of time zone names for us?


Hii @BrynCYDEF 

Sure! I’ll loop in someone from the FS team to get you the list!


Hi @BrynCYDEF - Do you think this article will be of help? This give you Value to Be Provided in Import/Export and I think this should work in your requirement, But I could be wrong too. Please let us know if this works!


TY @Kamakshi V for the connection to @suvashini.balashanmugam !

TY @suvashini.balashanmugam for the link!!!!  That looks exactly like what I need!  I will try it out with the Expression node today!

 

Much appreciated, team!!  :-)


Hello @BrynCYDEF and @Fredericjvr you can try this website to see Time Zone designations that could work too. For example I use “America/Detroit” for my Eastern Standard Time. https://time-zone.org/time-zones/America-Detroit

Hope that helps!


Hi @Fredericjvr - this Expression from @zachary.king will work for you but there is a massive problem using this parameter TODAY(‘Asia/Kolkata’)

 

There is no list anywhere to find the names of the time zones according to Fresh Works.

 

 

I created a similar expression but using DiffinDays() ** but I cannot test anymore due to a bug so I’m optimistic this will work but not sure.

**P.S.  I reported this apparent bug where I can no longer test Expression properly anymore bc the Test Expression function doesn’t “see” the name of the field being tested but always defaults to {{ticket.id}} 

 

This is the first one that i could get to work perfectly, thank you very much for your help :)


Reply