Skip to content

Can a workflow compute an aggregate (like a SUM grouped by a key) the way a single SQL query with GROUP BY would, and write that total back to a field?

Answer

Workflows don't have a native aggregate/sum activity, so you have to build it: first assemble the distinct group keys you need (e.g. one row per activity sequence) into a collection, then use a multi-instance loop over that collection, and inside the loop use an IFS Projection (API) task to read and accumulate the matching detail rows' values for that key and write the running total back via another Projection task. It's more steps than a SQL SUM, but it's the standard workflow-native way to reproduce that kind of grouped aggregation.

← Browse Workflows and automation questions