Remove A Row From A Collection
Remove A Row From A Collection Input collection: myTrucks50 Serial Year Make Model 8943 2020 Ford F150 4623 2018 Chevy Silverado 2315 2019 Ford F150 5466 202...
- 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/remove-a-row-from-a-collection/. Author: Matthew Devaney.
Remove A Row From A Collection Input collection: myTrucks50 Serial Year Make Model 8943 2020 Ford F150 4623 2018 Chevy Silverado 2315 2019 Ford F150 5466 2020 Chevy Avalanche
Output collection: mySolution50a (remove truck with Serial ‘4623’) Serial Year Make Model 8943 2020 Ford F150 2315 2019 Ford F150 5466 2020 Chevy Avalanche Solution code: //Create a collection
ClearCollect(myTrucks50, { Serial : 8943 , Year : 2020 , Make : "Ford" , Model : "F150" }, { Serial : 4623 , Year : 2018 , Make : "Chevy" , Model : "Silverado" }, { Serial : 2315 , Year : 2019 , Make : "Ford" , Model : "F150" }, { Serial : 5466 , Year : 2020 , Make : "Chevy" , Model : "Avalanche" } ); //Remove truck with serial 4623 code
ClearCollect(mySolution50a, myTrucks50); Remove(mySolution50a,LookUp(mySolution50a,Serial= 4623 )); Code language: JavaScript ( javascript )
Output collection: mySolution50b (remove trucks with ‘Ford’ make) Serial Year Make Model 4623 2018 Chevy Silverado 5466 2020 Chevy Avalanche Solution code: //Create a collection
ClearCollect(myTrucks50, { Serial : 8943 , Year : 2020 , Make : "Ford" , Model : "F150" }, { Serial : 4623 , Year : 2018 , Make : "Chevy" , Model : "Silverado" }, { Serial : 2315 , Year : 2019 , Make : "Ford" , Model : "F150" }, { Serial : 5466 , Year : 2020 , Make : "Chevy" , Model : "Avalanche" } ); //Remove all trucks with Ford make code
ClearCollect(mySolution50b, myTrucks50); RemoveIf(mySolution50b,Make= "Ford" ); 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