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

Help with Workflow calculate column value update 2nd list

Jump to solution

Hi All,

i need some help in regards to my workflow - i've looked at the previous example and still cannot seem to get it working https://community.nintex.com/thread/1463

i have 2 lists:

1st list - 4 columns: Name (person), Allocated days, Days Taken and Days Remaining (all numbers)

2nd list - 3 columns: created by, total days (calculated column) and status

the 1st list will just be a summary for someone to see how many days each person has left for holidays (name and allocated dates are manually input) and the 2nd list has a nintex workflow running which sends an email etc to approve who then approves the days and it updates the item status to approved or declined. what i would like the workflow to continue to do is calculate the total days someone has taken and then update the summary list with this number.

i included the steps in my workflow from the above thread but it completes without updating the 1st list:

full workflowstalls

any help would be appreciated

Labels: (2)
0 Kudos
Reply
13 Replies
Workflow Hero

Re: Help with Workflow calculate column value update 2nd list

Jump to solution

so when an item is added into the second list and approved, you want it to get the item from the first list for that person and then subtract the number of days and update days taken and days remaining?

Reply
Not applicable

Re: Help with Workflow calculate column value update 2nd list

Jump to solution

Hi Cassy,

Yes, essentially the list1 is just a list containing name (person), days allocated (both manually input), days taken and days remaining (both blank) which will only contain one item per person.  List2 will have numerous amount of leave requests by individuals throughout the year but i would like the worflow on creation on new item to look at the calculated column (start date minus end date excluding weekends) and sum all the days taken column which have been approved for that person (will be mulitple items) and update the days taken item for the same person in the list1. if the other column in list1 can be updated too (days remaining) even better (which should only be days allocated minus days taken)

Thanks again for your help

0 Kudos
Reply
Not applicable

Re: Help with Workflow calculate column value update 2nd list

Jump to solution

just to show the first part of the workflow:

0 Kudos
Reply
Workflow Hero

Re: Help with Workflow calculate column value update 2nd list

Jump to solution

OK I have two lists.

List 1 - your list 1 - I have called Leave Cards and looks like this:

List 2 - your list 2 - I have called Leave Requests and looks like this:

I have a workflow on list that fires on item creation.  it does the following:

  1. Requests approval for leave request
  2. if rejected, updates status of item to rejected
  3. If approved, queries list 1 where created by of list 2 item = name on list item (i.e. same person leave card) - pulls back item id (vIDLeaveCard), days remaining (vNumDaysRemaining) and days taken (vNumDaysTaken) from item in list 1
  4. output the item I retrieved via log in history list
  5. math operation: vNumDaysRemaining = vNumDaysRemaining - Total Days (List 2)
  6. math operation: vNumDaysTaken= vNumDaysTaken + Total Days (List 2)
  7. output the calculations via log in history list
  8. update item in list 1 where ID = vIDLeaveCard and set Days Remaining = vNumDaysRemaining and Days Taken = vNumDaysTaken

Reply
Workflow Hero

Re: Help with Workflow calculate column value update 2nd list

Jump to solution

ah ok sorry I was writing my reply while you replied so I didn't see this.  let me know if I have the wrong end of the stick.

Reply
Not applicable

Re: Help with Workflow calculate column value update 2nd list

Jump to solution

i'll adapt the worflow i have and delete my previous attempt and see if i can implement your solution thank you so much, i'll let you know how it goes - there's a couple of things i have in my workflow as you can probably see i didnt mention because i don't think it affects your solution (email notification, create item in calendar etc)

Reply
Not applicable

Re: Help with Workflow calculate column value update 2nd list

Jump to solution

Hi Cassy,

can you attach a screenshot of query list - i can't seem to work out what to include and also i assume the vIDLeaveCard is a single line text variable?

0 Kudos
Reply
Workflow Hero

Re: Help with Workflow calculate column value update 2nd list

Jump to solution

I can in the morning but I can tell you now

query list (list 1 - I called it leavecards)

where name column in list 1 = item property: created by on list 2

vIDLeaveCard is list item ID type variable x

Reply
Not applicable

Re: Help with Workflow calculate column value update 2nd list

Jump to solution

i've worked the query list out now thank you the problem i have now is how do i output the item retrieved via log in history list? all i can see is an insert reference button :-/

0 Kudos
Reply