Grouping and ordering array

Hi everyone,

I’ve got the following structure outside of Make.
Quote with Project Tasks as line items.
Each Project Task is linked to a Stage in the Project.
The Project task has an Order and Total field.

What I’m trying to achieve is the following:

  • I need to Group the Project Tasks by their Stage,
  • then order them asc by the Order field,
  • get the lowest Order number of the group and
  • add up the Total for the Stage.

I’ve got the following set up:

Iterator [63] gets the Stages with Module [64].
Iterator [8] gets the Tasks with module [10] for each Stage in the previous module.

Tool [78] is a counter, which I plan to use for some checks in the Array aggregator [14].

Array aggregator [14] is used to map previous values into a format that I can pass to the Xero Create Quote module.

Is there a way to achieve the above that I am not thinking of?

Do I need another aggregator to group the Tasks or can it be achieved with formulas?
When I’ve tried to put in another aggregator after module [10] and grouped it by the Stage field, it spat out even more bundles.

Hello @Kevin_V,
Please share some the sample data of Iterator [63].

Hi @dilipborad ,

Here you go.