Replace Cells In A Collection With Blank Values
Replace Cells In A Collection With Blank Values Input collection: myOrders49 OrderID Item UnitsOrdered CostPerUnit 1001 Notebook 25 2.5 1002 Crayons 8.62 100...
- 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/replace-cells-in-a-collection-with-blank-values/. Author: Matthew Devaney.
Replace Cells In A Collection With Blank Values Input collection: myOrders49 OrderID Item UnitsOrdered CostPerUnit 1001 Notebook 25 2.5 1002 Crayons 8.62 1003 Binders 10 13.34 1004 Pencils 21 1.5 1005 Erasers 0.89 Output collection: mySolution49 OrderID Item UnitsOrdered CostPerUnit 1001 Notebook 25 2.5 1002 Crayons 0 8.62 1003 Binders 10 13.34 1004 Pencils 21 1.5 1005 Erasers 0 0.89 Solution code: //Create a collection
ClearCollect(myOrders49, { OrderID : 1001 , Item : "Notebook" , UnitsOrdered : 25 , CostPerUnit : 2.5 }, { OrderID : 1002 , Item : "Crayons" , UnitsOrdered : Blank(), CostPerUnit : 8.62 }, { OrderID : 1003 , Item : "Binders" , UnitsOrdered : 10 , CostPerUnit : 13.34 }, { OrderID : 1004 , Item : "Pencils" , UnitsOrdered : 21 , CostPerUnit : 1.5 }, { OrderID : 1005 , Item : "Erasers" , UnitsOrdered : Blank(), CostPerUnit : 0.89 } );
//Replace cells with missing or blank values code
ClearCollect(mySolution49,myOrders49); UpdateIf(mySolution49,UnitsOrdered=Blank(),{ UnitsOrdered : 0 }); 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