JOIN One Columns From Another Collection
JOIN One Columns From Another Collection Input collection: mySales3 ProductID QuantitySold 1001 4 1002 5 1001 7 1000 1 1000 8 Input collection: myProduct3 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-one-columns-from-another-collection/. Author: Matthew Devaney.
JOIN One Columns From Another Collection Input collection: mySales3 ProductID QuantitySold 1001 4 1002 5 1001 7 1000 1 1000 8 Input collection: myProduct3 ProductID ProductName 1000 Jacket 1001 T-Shirt 1002 Baseball Cap Output collection: mySolution3 ProductID ProductName QuantitySold 1001 T-Shirt 4 1002 Baseball Cap 5 1001 T-Shirt 7 1000 Jacket 1 1000 Jacket 8 Solution code: //Create two collections
ClearCollect(myProduct3, { ProductID : "1000" , ProductName : "Jacket" }, { ProductID : "1001" , ProductName : "T-Shirt" }, { ProductID : "1002" , ProductName : "Baseball Cap" } );
ClearCollect(mySales3, { ProductID : "1001" , QuantitySold : 4 }, { ProductID : "1002" , QuantitySold : 5 }, { ProductID : "1001" , QuantitySold : 7 }, { ProductID : "1000" , QuantitySold : 1 }, { ProductID : "1000" , QuantitySold : 8 } ); //Add a column from another table code
ClearCollect(mySolution3, AddColumns(mySales3, "ProductName" ,LookUp(myProduct3,ProductID=myProduct3[@ProductID],ProductName)) ); 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