web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Grouping by a common i...
Power Automate
Unanswered

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.

 

Categories:
I have the same question (0)
  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    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.

     

  • LTSIG Profile Picture
    10 on at

    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. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard