JOIN All Columns From Another Collection
JOIN All Columns From Another Collection Input collection: mySales4 ProductID QuantitySold 1001 4 1002 5 1001 7 1000 1 1000 8 Input collection: myProduct4 Pr...
- Published
- Reading time
- 1 min read
Before you start
Is this guide for you?
- Best entry point
- Power Apps
- Time investment
- 1 min read
Imported reference from Matthew Devaney's blog for learning purposes. Original: https://www.matthewdevaney.com/powerapps-collections-cookbook/join-all-columns-from-another-collection/. Author: Matthew Devaney.
JOIN All Columns From Another Collection Input collection: mySales4 ProductID QuantitySold 1001 4 1002 5 1001 7 1000 1 1000 8 Input collection: myProduct4 ProductID ProductName UnitPrice Stock 1000 Jacket 70 10 1001 T-Shirt 30 4 1002 Baseball Cap 20 8 Output collection: mySolution4 ProductID QuantitySold ProductName UnitPrice InStock 1001 4 T-Shirt 30 4 1002 5 Baseball Cap 20 8 1001 7 T-Shirt 30 4 1000 1 Jacket 70 10 1000 8 Jacket 70 10 Solution code: //Create two collections
ClearCollect(myProduct4, { ProductID : "1000" , 'ProductName' : "Jacket" , UnitPrice : 70 }, { ProductID : "1001" , 'ProductName' : "T-Shirt" , UnitPrice : 30 }, { ProductID : "1002" , 'ProductName' : "Baseball Cap" , UnitPrice : 20 } );
ClearCollect(mySales4, { ProductID : "1001" , QuantitySold : 4 }, { ProductID : "1002" , QuantitySold : 5 }, { ProductID : "1001" , QuantitySold : 7 }, { ProductID : "1000" , QuantitySold : 1 }, { ProductID : "1000" , QuantitySold : 8 } );
//Add all columns from another table code
ClearCollect(mySolution4, Ungroup( DropColumns( AddColumns( mySales4,
"myGroupedColumn" , Filter( myProduct4, ProductID=mySales4[@ProductID] ) ), "ProductID" ), "myGroupedColumn" ) ); Code language: JavaScript ( javascript )
Tagged
Collections · Power Apps
Have a Microsoft 365 topic idea?
Share article suggestions, community session ideas, corrections, or real-world scenarios for future nextM365 learning notes.
Keep learning Microsoft 365
Explore more practical guides for SharePoint, Power Platform, Copilot Studio, migration, automation, governance, and security.
Continue learning
Related tutorials
Related questions
Related comparisons
Next action