Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Patch one table on top of another

(0) ShareShare
ReportReport
Posted on by 48

Tried my best to find a title, but not sure how to post it exactly... So...

I have a table 1

NameID
John1
George2
Jim3
Bill4

 

and I have another table 2

NameID
Chris1
Patric2
Francois3

 

I want to always keep the second table, and put on the beginning of the second table the first one and adjust the ID accordingly.

Preferably I would like to do that with collections..

The result I want is : 

John1
George2
Jim3
Bill4
Chris5
Patric6
Francois7

Hope you understood the needed result!

Thank you in advance 🙂 

  • eka24 Profile Picture
    20,921 on at
    Re: Patch one table on top of another

    That is fine.

    Thanks

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • SmoothOperator Profile Picture
    48 on at
    Re: Patch one table on top of another

    I did this but with a ShowColumns() way and managed to make them both the same column collections and then used the intitial way you proposed 

     

    Thank you!

  • Verified answer
    eka24 Profile Picture
    20,921 on at
    Re: Patch one table on top of another

    Try this:

    ClearCollect(JoinedTable,Table1,RenameColumns(Table2,"Name2","Name","ID2","ID"));
    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
  • eka24 Profile Picture
    20,921 on at
    Re: Patch one table on top of another

    Your table had same columns. Did it work? 

    If different column names we can use AddColumns

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • SmoothOperator Profile Picture
    48 on at
    Re: Patch one table on top of another

    if both tables have different columns though? I believe that 

    ClearCollect(
     JoinedTable,
     Table1,Table2
    )

    does not work and merges them. They should be exactly the same.. 

    any thoughts?

  • eka24 Profile Picture
    20,921 on at
    Re: Patch one table on top of another

    @SmoothOperator 

    ClearCollect(JoinedTable,Table1,Table2)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,700 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard