I am working on fixing an issue we run into when processing invoices. A single invoice can have multiple GL codes assigned to it. Sometimes we end up with 3,000+ GL lines for a single invoice. When we look into these scenarios, we find that some of the GL codes are the same, but just have different amounts.
What I would like to do is combine the GL codes that are the same to cut down on how many lines there are. The GL values are assigned to a document in a multi-value field. The value has the GL code and the amount being assigned to it at the end of each code.
I have thought about inserting the values into a SQL database table that is truncated each time the workflow runs and then running a SQL query to group the values. My concern is the amount of time it would take to insert the values into SQL. Can anyone think of a better way to group them using Workflow?