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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Items form 2 lists...
Power Automate
Unanswered

Get Items form 2 lists combine into one table

(0) ShareShare
ReportReport
Posted on by

I have 2 sharepoint lists that both have a "assigned to" column which is a person/group. I have made a basic flow that will get the needed info from both lists. I have added a  "union expression" after the selects, but when it out puts the table it shows as two rows. I want all the information to show on one row. 

MatthewMandegar_0-1674754185334.png

MatthewMandegar_1-1674754249932.png

 

 

Categories:
I have the same question (0)
  • v-chengfen-msft Profile Picture
    Microsoft Employee on at

    Hi @MatthewMandegar ,

    Do you want to merge two records together?

    I made a template for your reference:

    Here are lists

    vchengfenmsft_1-1674787426969.pngvchengfenmsft_2-1674787443369.png

    Here is flow:

     

    vchengfenmsft_0-1674787408050.png

    Here is result:

    vchengfenmsft_3-1674787560678.png

     

     

    Best Regards

    Cheng Feng

     

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Do you need to do this across multiple rows in SharePoint, or just a single row?

  • MM-23041621-0 Profile Picture
    on at

    I made a template like yours and the output looks correct but there are two issues. one is due to custom headers I cant put spaces in the titles, and two when I try to email the "current items" from that loop I get a template error. I want the output to look like the I posted in the original image. 

  • MM-23041621-0 Profile Picture
    on at

    The two lists are constantly being updated. I just want to pull the computer and phone information assigned to the person and send in an email. I am not storing the combined data any where. I have gotten my flow to pull the right information I'm just not sure why the table is 2 rows instead of 1. 

  • grantjenkins Profile Picture
    11,063 Moderator on at

    @MatthewMandegar The solution provide by @v-chengfen-msft should work as you want.

     

    For custom headers with spaces, you can just type out your headers with spaces in notepad (or similar) then just copy/paste them into the HTML table. You just can't type spaces directly into the HTML table.

     

    For sending the email you would be sending the output of the HTML table using something like the following:

    body('Create_HTML_table')

     

    If you wanted to style the HTML table so it shows nicer in your email you can add some CSS. I generally add this into another Compose then add the Compose and Create HTML table output in my email. Some sample CSS below.

    <style>
     table {
     border-collapse: collapse;
     }
     table td,
     table th {
     border: 1px solid #ddd;
     padding: 6px 20px;
     text-align: left;
     }
     table th {
     background-color: #1C6EA4;
     color: white;
     }
    </style>

    grantjenkins_0-1674982124351.png

     

    Send an email contains output from Compose HTML table and Create HTML table.

    grantjenkins_1-1674982212942.png

     

     

  • MM-23041621-0 Profile Picture
    on at

    Followed your suggestion and it looks like it works however the table is showing up in square brackets and quotes in the output?

    MatthewMandegar_0-1675122766909.pngMatthewMandegar_1-1675122819701.png

     

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Can you show your Send an email action to understand what you have in there that might be causing the square brackets, etc.

  • MM-23041621-0 Profile Picture
    on at

    The send an email action just sends everything in the Variable. I built it this way so I can modify the flow to both send and email and create a item in a sharepoint list. 

     

    MatthewMandegar_0-1675442132924.pngMatthewMandegar_1-1675442153592.png

    MatthewMandegar_2-1675442213125.png

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard