cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Number of days deduction (Annual Leave)

Jump to solution

Hello,

I am new to Nintex and have tried to sell this to my team by means of a new annual leave calendar.

The aim is to have two lists

 

List 1 - this has the staffs allowance, leave taken and leave remaining numbers

List 2 - this is where the request is logged

 

I am having difficulty with the maths element and getting it to work.

I basically want the workflow to update List 1 with the leave taken by simply using the existing number, and adding the number in the workflow to this

 

Has anyone else had this issue?

 

Thanks

Labels: (1)
0 Kudos
Reply
5 Replies
Highlighted
Nintex Employee
Nintex Employee

Re: Number of days deduction (Annual Leave)

Jump to solution

Hi Anthony,

you'll need 2 actions for this.

1. Math Calculation action

  you use this to add the two numbers together and then store the result in a Number workflow variable.

2. Update Item action

  you use this to update the item and specifically they leave taken field with the value in your Number variable.

cheers,

Vadim

View solution in original post

0 Kudos
Reply
Highlighted
Not applicable

Re: Number of days deduction (Annual Leave)

Jump to solution

Hi Vadim,

It is the math calculation that I am struggling on.

eg Dave has requested 2 days off.  I want it to go to the list and find Dave from colleague column, and update his leave taken so that its leave taken + days requested (from workflow)

I keep getting errors sadly, and my laptop is about to be thrown out of the window

Many thanks

0 Kudos
Reply
Highlighted
Nintex Employee
Nintex Employee

Re: Number of days deduction (Annual Leave)

Jump to solution

Hi Anthony,

I think I have the same laptop .

So for the math operation action, you would either have to have the "Leave taken" value already (maybe via a Query List action and stored in a variable) or, you can have the Math Operation do a List Lookup to your List 1.  For the lookup, you'll need to put in the "when" clause, so that it narrows the result down to the one particular item you are interested in.

Hope that helps.

cheers,

vadim

0 Kudos
Reply
Highlighted
Not applicable

Re: Number of days deduction (Annual Leave)

Jump to solution

Hello,

firstly many thanks for your help - I have almost nailed it! I have managed to get it doing almost what I want it to do, except the maths aspect seems to be doing its own thing!

Leave Taken does not seem to be updating correctly

My maths solution is as follows

Workflow Date - Leave Remaining (this is a variable which comes from the list)

PLUS

Workflow Data - Requested (days leave that have been requested)

Store result in* var_decrament

UPDATE ITEM:

I want it to update "LeaveTaken" which equals workflow data with var_decrament

Where have I gone wrong

0 Kudos
Reply
Highlighted
Nintex Employee
Nintex Employee

Re: Number of days deduction (Annual Leave)

Jump to solution

Hi Anythony,

firstly, check that your var_decrament variable contains the value you expect.  You can use a Log in the History List action to log that variable.  Then when you publish and run the workflow, look at the workflow history and should have logged the value.

If that look right, make sure your Update Item action is configured to update the Current Item, and then specify the Leave Taken field, and set it to the var_decrament variable.

cheers,

Vadim

0 Kudos
Reply