cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
greggpowell
Helper II
Helper II

How to rowbind / combine Dataverse Tables in Power apps

Is it possible in Power Apps to combine multiple tables - where each has the same headers/column names - such that the rows of each table are combined into a single table - dynamically. 

 

I have multiple tables in dataverse - all have the same column headers. Each table is updated separately in a connected form.

 

I want to show all of the records/rows from each tables in a single Data Table. Something analogous to the rbind function in R.

 

Here's an example - 

 

greggpowell_1-1629644887043.png

Table1

 

greggpowell_2-1629644920731.png

Table 2

 

greggpowell_3-1629644949661.png

Table3

 

greggpowell_4-1629644976887.png

Table123 Combined

 

 

I would be very grateful for a solution.

 

Thanks much.

Gregg

AZ

 

 

 

 

 

 

3 REPLIES 3
PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @greggpowell ,

 

I have not tried it personally but you can give the below code a try. 

ClearCollect(colTable1,Table1);
ClearCollect(colTable2,Table2);
ClearCollect(colTable3,Table3);
ClearCollect(colCombined,colTable1,colTable2,colTable3);

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Where does that code go? - 

I modified your suggestion to match the actual table names that I have in Dataverse....

 

I just get an error:

greggpowell_0-1629648243171.png

 

In your example - are you declaring 4 'new' tables - colTable1, colTable2, colTable3, colCombined? Once your done this - it would seem - you'd want to display the colCombined table - but adding all of this code doesn't tell Power Apps that I can see) to display to 'contents' of the 'new' colCombined table in the Data Table.

 

Would the colTable1, colTable2, colTable3m and colCombined tables also have to exist in Dataverse? This is almost a rhetorical question - because the more I think about this - I think, I'd need those tables there also.

Hi @greggpowell ,

 

First with the error, would you please let me know what error message your getting ? 

colTable1,colTable2,colTable3,colCombined are the collection and in the first three collection by the code you are adding the data from the Dataverse table. In the fourth collection we are trying to combine all the data from the three collection as there column structures are same. 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

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 (935)