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 :
Power Platform Community / Forums / Power Automate / How to stack two list ...
Power Automate
Unanswered

How to stack two list results together

(0) ShareShare
ReportReport
Posted on 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

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,856 Most Valuable Professional on at
    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

     

     

     

  • mnoah Profile Picture
    29 on at
    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,856 Most Valuable Professional on at
    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 at
    Re: How to stack two list results together

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

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard