Add +5 Working Business Day in Workflow Designer [toggle scripting]

ricobuenvia
Tera Contributor

Hi everyone,
I have a question regarding date calculation in my workflow. Right now, I'm using the line addDays(5) in my toggle script to add 5 days to the current date, and it's working as expected. However, the requirement is to add 5 business days, excluding Saturdays and Sundays. Does anyone know help me how to achieve this?

Please refer to the image below for more context. Thanks in advance!

7 REPLIES 7

Hi Ankur, Thanks for the information! I tried it in the fix script and it's working well—the date is displaying correctly. However, when I use the same logic in the toggle script, the date doesn't appear. Could you please guide me on how to properly return the value to the date field in the toggle script?

Hi Ankur, Thanks for the information! I tried it in the fix script and it's working well—the date is displaying correctly. However, when I use the same logic in the toggle script, the date doesn't appear. Could you please guide me on how to properly return the value to the date field in the toggle script? Thanks again!

Hi Ankur may I ask how can I return the value on the date field in my incident form? because right now its working fine if I test it on Fix Script.