Set Field Value using Workflow Sublist Action Group
I have a need to store the Sum of specific items on a Sales Order in a custom field for reporting. Let say on a SO we have a mix of Items, some that start with AB-.
I've used the Sublist Action Group on Workflows in the past for other purposes and thought I could create a Set Field Value action using Before Record Submit. In fact ... I have it working somewhat correctly. I've set the Condition to {line.item} Like 'AB-%' which works. The issue is with the Set Field Value formula. I've tried max({line.amount}) and all kinds of variation on the theme. All the workflow does is store the last line on the SO that matches AB-. So for example, if on the SO I have 3 lines such as
AB-1 $200
AB-2 $400
AB-3 $650
....
the workflow is storing $650 in the field instead of creating a sum of all three line items. Any thoughts how to tackle this? Thanks -