Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Grouping by a common identifier using outputs from select operations

(0) ShareShare
ReportReport
Posted on by 10

Hi,

 

I am working on a flow to push data back into a webservice and having some pain getting it to send each line individually. 

 

The data is the output of 2 selects. One includes ID & Order the other ID & RouteID. The ID is the common identifier. I need it to show as "RouteID, ID, & Order" for each order number line currently when parsing the data it shows all the order numbers in one the list and will not split them (I have tried multiple techniques to split the order numbers). The webservice can only accept 1 response at a time so I cannot send grouped order numbers. 

 

Example;

{
    "ID": "9154",
    "Order Number": [
        "1769000",
        "1771018",
        "1769115",
        "1755243",
        "1757047",
        "1761184",
        "1764253",
        "1771225",
        "383933",
        "1771165",
        "1769848",
        "1771228",
        "1770271",
        "1771185",
        "1771313",
        "1771124",
        "1769825",
        "1770209"
    ],
    "RouteID": "17810"
}

 

The SQL that pushes it back in in short needs the Route ID and Order on its own line. 

 

Thanks.

 

  • LTSIG Profile Picture
    10 on at
    Re: Grouping by a common identifier using outputs from select operations

    Sill not having much luck this is where the flow is currently. 

    LTSIG_0-1715948793559.png

    The data is help as above in the compose 1 section but I am unable to break the order numbers down. 

     

    {
      "Driver ID""9178",
      "Order Number": {
        "body": [
          {
            "Order Number": [
              "1769548",
              "1771657",
              "1771563",
              "1766908",
              "1769360",
              "1769549",
              "1771602",
              "1771111",
              "1770274",
              "1765406",
              "1769249",
              "1771651",
              "1770155",
              "1771546"
            ]
          }
        ]
      },
      "RouteheadID""17873"
    }
     
    Thanks. 
  • Verified answer
    ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on at
    Re: Grouping by a common identifier using outputs from select operations

    Hi @LTSIG 

     

    Here is the sample flow.

     

    I have stored input object in compose action:

    {
    "ID": "9154",
    "Order Number": [
    "1769000",
    "1771018",
    "1769115",
    "1755243",
    "1757047",
    "1761184",
    "1764253",
    "1771225",
    "383933",
    "1771165",
    "1769848",
    "1771228",
    "1770271",
    "1771185",
    "1771313",
    "1771124",
    "1769825",
    "1770209"
    ],
    "RouteID": "17810"
    }

    Add Select action and enter an expression in 'From' parameter. Expression needs to be added in the expression box as shown below:

    ManishSolanki_0-1715878823342.png

    outputs('Compose')?['Order Number']

    Enter the Map/key as plain text & set expression for each key item:

    Key Value
    RouteID outputs('Compose')?['RouteID']
    ID
    outputs('Compose')?['ID']
    Order item()

     

    The output of select action will give you an array than you iterate and pass each item to web service.

     

     

    Output:

    ManishSolanki_1-1715879067784.png

     

     

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1