Subtracting Quantity of a Consumable using Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 01:57 PM - edited 11-28-2023 01:58 PM
We have a record producer that we use whenever we deploy consumables out of our stockroom. We have a question on the form that asks how many of the items are being removed.
In flow designer when trying to use the transform function for Math -> Subtract, I am only able to hard code a number (1 in this case). In order for multiple items to be consumed and the quantity adjusted accurately, users have to submit the record producer multiple times.
So here are my following questions:
1. Is there a way to utilize a data pill inside a transform function to help determine the number to subtract?
2. If the above is not possible, is there another way where I can reduce the quantity of the consumable according to the actual quantity being entered without having the user complete the record producer multiple times?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 03:49 PM - edited 12-01-2023 05:34 PM
Hi @JordanDR,
I'm not sure if this function will work with Record Producers (still trying to find documentation) but this function appears to work well for marking items as Consumed. You will end up with items on the Consumable (alm_consumable) table marked as Consumed:
var new_sys_id = new Consumables().splitForeground(this_consumable, this_qty, '10', '', '', '', '', this_user);
In regards to the above, this_consumable refers to the Sys ID of the consumable you want updated, this_qty refers to the quantity passed, '10' value is to mark the State as 'Consumed', and this_user is the Sys ID of the user you want to mark as the Consumer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 11:50 PM
Hi @JordanDR ,
You can create Custom action and do necessary calculations and sent it to flow. Refer below link.
Please mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
