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

Community site session details

Session Id : hZaLyRiOIdHWOESTs048E/
Power Automate - Building Flows
Unanswered

How to stack two list results together

Like (0) ShareShare
ReportReport
Posted on 13 Jun 2022 19:49:30 by 29

I have two SharePoint lists.

 

List1 has an ID of 39.  List two has a lookup column that points to List1 ID (in this case 39).  It is always a 1:1 relationship and list 2 will never have duplicate rows with the same lookup ID.

 

What I want to do is combine these two sharepoint list items in Power Automate and create one result by stacking the tables next to each other.  I've tried a Union() but it creates a an additional row.

 

Like this:

2022-06-13 15_45_53-Book1 - Excel.png

  • mnoah Profile Picture
    29 on 16 Jun 2022 at 16:06:29
    Re: How to stack two list results together

    @abmYes thank you I will send the lists to an Azure Function instead.

  • abm abm Profile Picture
    32,506 Most Valuable Professional on 14 Jun 2022 at 22:18:02
    Re: How to stack two list results together

    Hi @mnoah 

     

    I am not sure but have a look on SharePoint API or Graph API.

  • mnoah Profile Picture
    29 on 14 Jun 2022 at 12:16:36
    Re: How to stack two list results together

    Yes I could do that if I wanted to build the JSON object manually. But I have many columns of data and columns may be added in the future.  How to build it dynamically?

  • abm abm Profile Picture
    32,506 Most Valuable Professional on 13 Jun 2022 at 21:00:24
    Re: How to stack two list results together

    Hi @mnoah 

     

    Like you mentioned Union() expression doesn't work for the scenario you described. What you could do is read the first list then filter the list 2 using list 1 id. Get both results into a JSON format like below in a compose action step.

     

    {

      "Id": 39,

      "Name": "Joe,John"

      "Date": "6/10/2022",

      "LookupID": 39,

      "Department": "HR",

      "Resource": "Yes"

    }

     

    Next map the compose output in an array (Append array)

     

    This way you can build all the data in one row.

     

    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

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!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete