Calculate Business Days


Badge +4

Why is it that I can set a task reminder to go out after a set number of business days or hours, and I can pause for a number of business days, but I can't calculate a date that is X business days/hours away? I've tried out two UDAs available online, but they aren't working very well for me.

I'm using Nintex WF and Forms 2013 Enterprise. In my workflow I check to see what "media type" has been selected, and then assign a due date based on what has been requested.


5 replies

Userlevel 5
Badge +9

I think that we should vote :

Inline Function or Action to Calculate Business Days/Hours – Customer Feedback for Nintex

Badge +4

I have a similar issue. I have a workflow that sends out reminders to complete a task every two days. But those receiving them have asked that it be set to only two work or business days. So, weekends and holidays need to be taken into account so they are not counted in the two-day pause action in the workflow.

Badge +4

Holidays are not counted in the reminders and escalation phase of tasks. To configure the holidays list go to site setting > Nintex Workflow: Manage Holidays > Add a new holiday. Some holidays will have to be configured each year, but ones that consistently fall on the same numbered day of a month (July 4th & Xmas) only need configured once.

Badge +4

Thanks...shouldn't have used the word 'task' given its specific meaning here. It's not a SharePoint task...something external to SharePoint.

Badge +1

I'm posting my solution for this common issue here in the hopes to help other users who have similar requirements to assign Flexi-tasks to users on Business Days only. I had seen on nintex community that there was a UDA created for this but it didn't work properly for me (due dates were just blank). I am using SharePoint 2013.

Here is my manual workaround that has been working very well for my workflow:

 

22708iF95BA3B39F1D9C6B.png

 

  1. Query List Action - this is used to query a list we have on our site where the number of days to complete a task is stored. This is used to find the appropriate number of days given certain conditions but if your days are standard for all tasks this is not necessary. Output is a number variable, varDaystoAdd
  2. Calculate Date Action - adds varDaystoAdd to current date and stores in date variable, varDueDate
  3. Set Variable Action - finds the day of the week varDueDate is: 
    1. use function:  fn-FormatDate(varDueDate, "dddd") store in varDay
    2. "dddd" will output the day of the week written out ex) "Friday", "Saturday" or "Sunday"
  4. Log day - i used this just to record varDay for troubleshooting purposes
  5. Conditional Statement - is varDay = value of Saturday?
    1. If Yes, add 2 days to due date
      1. Date is varDueDate, put value of 2 in Days field and store again in varDueDate
      2. If No, nothing happens
  6. Conditional Statement - is varDay = value of Sunday?
    1. If Yes, add 1 day to due date
      1. Date is varDueDate, put value of 1 in Days field and store again in varDueDate
      2. If No, nothing happens

         

Reply