Skip to main content

Morning


 


I've inherited a Nintex 2013 workflow. It calculates a probation period for an employee and assigns an action on the time elapsed. Currently it fires 2.5 months or 5.5 months. I need to add a value which fires coming up to 1 month - so 3 weeks.


 


There are calculate date actions which takes the start date from a SP list, adds the required time the stories it in a variable called Probationary period end.

8927i9F75BB3A8763D7B5.png

I've added the 1 month action but the Flow is ignoring it and going straight to the 3 month action. The screen grab below shows how 3 month action is configured, I've repeated this in my 1 month action but with 5 in the Days field. Any ideas where I'm going wrong? All help appreciated!

8928i6E3B61FD9374F236.png

Hi @Sutekh,


how is the switch action configured?  



@Sutekh wrote:

 


Currently it fires 2.5 months or 5.5 months. I need to add a value which fires coming up to 1 month - so 3 weeks.



How does the workflow know if 2.5 or 5.5 months are correct?


Hi @Tarf

The Switch action configuration is below:

8929iA404830FA21EA20E.png

Currently there's no logic on the workflow. So when I came to the Flow it just had the two possible values 3 month or 6 month. I'm coming back to Nintex after a couple of years. So with more than two options will I need to add a Condition? 





Hi @Sutekh,


in your workflow there is a variable called "Probation Period". Somewhere before your switch action, this variable gets set to either "3 months" or "6 months". You´d have to set it in your workflow to "1 month" to get your workflow to calculate the 1 month date.


 


A switch statement checks a given variable for a given number of values (which is then your "condition").


Thanks @Tarf 

There's no action before the Switch Action that I showed which sets the variable. 


 


There's an action to set a different variable, then a Run If action with two conditions looking at different fields in the SP list. The variable in question - Probationary period end - then gets set in the Calculate Date actions as detailed above. I currently have that variable set to one month in the Calculate Date action I set. So I can't see where else it would be set?


@Tarf Just to put it in context this how it looks:

8930i80A0641FE833FB96.png


Okay so maybe the variable has a default value? Or it´s coming from the item properties.


Your switch wouldn´t do anything if the variable had no value.


 


I've checked the variable and it doesn't have a default. It's set as blank. It seems that the first point that the variable value is set is at those Calculate Date actions. Any ideas? 


Reply