cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SmoothOperator
Advocate I
Advocate I

Patch one table on top of another

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 🙂 

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

6 REPLIES 6
eka24
Super User
Super User

@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.

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?

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.

 

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.

View solution in original post

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!

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.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,819)