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
eka24
Super User III
Super User III

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 III
Super User III

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

 

eka24
Super User III
Super User III

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (47,707)