Workflow to update list item in a different list

  • 28 July 2017
  • 1 reply
  • 3 views

Badge +1

Hello. I need help with Ninetex workflow.

Lets say I have 2 lists: supply inventory and supply requests

Supply inventory would have 3 columns: title, initial quantity, available quantity.

If I need 5 pens, I would create a supply request, choose "pen" from list lookup column, and type 5 for desired quantity. As soon as I save my list item, a workflow should find an item from Supply Inventory with title "pen", subtract 5 from available quantity, and save the item.

If request was rejected, 5 should be added to available quantity amount.

Thank you in advance.


1 reply

Userlevel 5
Badge +14

first you need to get actual inventory value for ordered item from inventory list. use Query list action and filter by ordered item.

configure to return value of available quantity field.

returning of item ID is as well useful - it will be used to write update back to inventory list

206064_pastedImage_1.png

next use Math action to add or substract ordered or rejected amount.

206065_pastedImage_2.png

and finally update new value back to inventory list.

206066_pastedImage_3.png

whereas it is possible to implement it this way, I do not recommend to use sharepoint for these kind of logic at all!

sharepoint is not transactional system!

if two or more requests are being processed at about the same time, you will get wrong inventory levels calculated.

Reply