Consume a consumable using a workflow

Alex319
Giga Guru

Hi All, 

I have created a workflow which I am trying to use to automatically consume consumables when the request is approved/completed. 

currently the workflow will add the item as consumed but it won't 'consume' quantity from the existing record. The picture below highlights this: The arrow shows the quantity which isnt decreasing and the circle is the number that increases when the workflow runs. I am trying to set it so that when in stock goes down, consumed goes up. 

Alex319_0-1667911950204.png

within the workflow this is the code I am using: 

Alex319_1-1667912057521.png

Consumables is the current script include and hasn't been modified. 

I have tried to use the following community posts to solve the issue but haven't been able to get the in stock quantity to decrease automatically:
https://www.servicenow.com/community/it-service-management-forum/script-works-in-scripts-background-... 

 

https://www.servicenow.com/community/it-service-management-forum/automatically-consuming-a-consumabl... 

 

Finally, this is the catalog item I am using to create the request. I have kept the variables visible so it is clear that sysID is being used and not display name

Alex319_2-1667912289424.png

Any help would be greatly appreciated, 

Thanks

Alex

 

 

0 REPLIES 0