Using Mutiple Switch Actions to Calculate a Date


Badge +8

I found an article on here on using multiple switches but I couldn't find what I am trying to do. In a nut shell, my workflow is setup to where a reviewer changes a review status to either passed, failed or pending it moves those items to another list. It then clears out the review fields and resets the due date to the following date so it's ready for review when the reviewer comes in next day. I have the below workflow to where I have a switch action to run based off a column called frequency. This date would be either Daily, Weekly, Monthly, etc.. I am in the process of learning how to run and calculate via business days but I haven't got that far yet with my skillset and I am scrambling to get this running for the weekend. What I am trying to do here (for now with daily tasks) is to throw a switch workflow in for "Monday, Tuesday, Wednesday, etc." to say, "if the date = Friday, calculate 3 days to the current due date". I am not sure if I can put another switch in my workflow like that and if so, where. Thanks!

Cassy Freeman

186455_pastedImage_0.png


5 replies

Userlevel 5
Badge +14

regarding switch action itself, you can nest it as many times as you like there is no restriction.

some more thoughts on your concept

- have you considered having frequency field a numeric value that would directly keep value to add up to current due date?

so if your least unit is day, it would keep number of days - 1 day for daily, 30 days for monthly, 90 days for quarterly, etc.

that way your workflow would be simplified to a single branch.

- reg. calculation of business days: it's really a pain to calculate it with nintex workflow (see other topics on the forum).

however, does it really matter which day a task gets assigned? whether it is business day or a day off?

in either case assignee will take of it earliest on next business day. if I understood your description correctly, you need not to advance due date by specific number of BUSINESS day. so in your case I would not bother with business days at all

Badge +8

Hi Marian

Your frequency suggestion is actually a very good idea! Did not think of something that simple. Thanks!

As for your second thought, it does matter from a reporting standpoint. We report on time it takes to complete. So keeping the weekend in would skew the turnaround time.

Badge +8

I just had a new thought. Why not use a set condition, inside my switch to say if the column "Day" equals Friday, calculate 3 days to the due date. If not, calculate 1 day from the due date.

186474_pastedImage_0.png

Userlevel 5
Badge +14

two quotes from your former explanations:

it does matter from a reporting standpoint

It then clears out the review fields and resets the due date to the following date

how do you do reporting if you clears data with every review step?

I have a feeling you might need to implement multi-stage approval workflow and you are trying to mimic that with advancing due date within the list item.

if so, you might be better considering of using state machine and assigning kind of tasks (eg. flexi task) to a responsible(s) within single stage(s).

you can get some ideas how to design it eg. here Workflow: Approval best practice

it will not help you to calculate business days, but it's much better concept fot this type of workflows.

Userlevel 5
Badge +14

it's fine in term of using switch action (the topic is about).

however, it doesn't work corretly in term of calculating business days. if there is a day off on Monday, you still set due date for it.

Reply