Hi all, I'm trying to create a custom transaction body field that calculates the SUM of the qty of all inventory items on the order. Can someone help suggest a formula to use for this custom field?
a
AI1
12/02/2022, 8:25 PM
This can’t be done by a formula
You could make a summary saved search and use that to source the value of a field
👍 1
s
Scruffy
12/02/2022, 9:09 PM
You could also potentially run a UE script that grabs all sublist member qtys, sum them, then write to the field beforeSubmit.
👍 1
h
hdsea
12/04/2022, 2:48 AM
Thanks for your input @AI1 & @Scruffy!
I ended up deriving it from a summary search.
I built the following saved search:
• Criteria:
◦ Type = Sales Order
◦ Item: Type = Inventory Item
◦ Closed = False
• Results:
◦ Field: Formula (Numeric) | Summary Type: Sum | Formula: CASE WHEN {item.type} = 'Inventory Item' THEN {quantity} ELSE 0 END
• Available Filters:
◦ Internal ID
Then I selected that search under 'validation & defaulting' on the transaction body field.