infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Community News
Migrated Forums
Home
Groups
Process Automation (IPA) Community
TimeOut -> Only on business days.
Legacy Contributor
Does anyone have an example of the user action node only timing out on a business day?
Find more posts tagged with
Comments
JD Miller
A qualifying question I have, is are you attempting to make sure a 5 day timeout ends on a M-F? or are you attempting to Time out in 5 business days. (Values given are just examples)
Both would be done using the javascript editor set that variable based on the System day (not date) Sunday = 0 Saturday = 6. But the logic in the node would differ depending on the answer to the above question.
russel-cornelson
var currentDate = new Date();
var weekday = currentDate.getDay();
var TimeOutDays;
switch (weekday){
case 0:
TimeOutDays = 3; //mon,tues,wed
break;
case 1:
TimeOutDays = 3; //tues,wed,thur
break;
case 2:
TimeOutDays = 3 //wed,thurs/fri
break;
case 3:
TimeOutDays = 5; //thurs,fri,sat,sun,mon
break;
case 4:
TimeOutDays = 5; // fri,sat,sun,mon,tues
break;
case 5:
TimeOutDays = 5; //sat,sun,mon,tues,wed
break;
case 6:
TimeOutDays = 4; //sun,mon,tues,wed,
break;
default:
TimeOutDays = 3; //should never get used.
}
russel-cornelson
NOTE: You could likely write this is a bunch of different ways simply using math with dates if you know exactly what you are looking for. But the above example should get you going in the easiest fashion
Child Item