What Is PowerApps Collection And How To Create A Collection In PowerApp

In simple words, collection by mean is a group of items. Power Apps provides most useful feature i.e. Power Apps Collection. It is an array that is use to keep data in Power Apps memory.
 

Create a Collection in Power Apps

 
Syntax
 
Collect (Collection Name, record(s))
 
Here,
 
Collect = this is the default function name provided by Power Apps to create the collection.
 
Collection Name = we need to give any name to our collection.
 
Record(s) = we are providing values to our collection, each record stores item values within curly braces.
 

Steps to Create Collection

 
Step 1
 
Open Power Apps window. Select OnStart Property.
 
What Is PowerApps Collection And How To Create A Collection In PowerApp
 
Step 2
 
Let’s take a simple example for Employee details showing employee id and designation. Add the following formula OnStart method.
 
Collect (EmployeeDetails, {EmpID: "11021051", Designation: "Software Developer"}, {EmpID: "11021052", Designation: "Product Manager"}, {EmpID: "11021052", Designation: "HR"})
 
What Is PowerApps Collection And How To Create A Collection In PowerApp
 
Step 3
 
Now save and publish the app. And reopen the app in edit mode. Go to View ->Collections.
 
What Is PowerApps Collection And How To Create A Collection In PowerApp
 
Step 4
 
Clicking on Collection will show you the collection you have made.
 
What Is PowerApps Collection And How To Create A Collection In PowerApp