This Power Apps tutorial will walk you through several examples of how to use the Power Apps collection with a SharePoint list based on various scenarios.
We had a requirement while working with the Power Apps Canvas app to create a collection using the SharePoint list within the Power Apps environment.
It will also be discussed how to work with the Power Apps collection using the SharePoint list that contains the following items:
- Power Apps collection SharePoint list
- Power Apps show collection SharePoint list value
- Power Apps collection SharePoint list choice column
- Power Apps collection SharePoint list column
- Power Apps collection SharePoint list person field
- Power Apps collection SharePoint group field
- Power Apps collection SharePoint list limit
- Power Apps collect large SharePoint list
- Power Apps collection SharePoint image
- Power Apps collection SharePoint list attachments
Before working with the Power Apps collection via the SharePoint list, we recommend you read our previous article about what the Power Apps collection is and how to use it in various ways.
Power Apps collection from SharePoint list
Do you know how to make a Power Apps collection from a SharePoint list? If not, this section will show you how to use Power Apps to create a collection using data from a specific SharePoint list.
To work with this, the required steps are:
- We have created a SharePoint list called “Product Model” that contains various types of columns such as Title (Default), Purchase Date (Date and time), Ordered By (People column), Manufacturer (Choice column), and some random data as shown below:
- Prepare a blank Power Apps canvas app and connect the above SharePoint list to the canvas app.
- On the Power Apps screen, add a button control and set the Text property as “Create collection SharePoint list“
- Insert the below formula on the button’s OnSelect property. As a result, when the user clicks the button it will create a collection using the above SharePoint list data.
OnSelect = Collect(CollProductModel, 'Product Model')
Where,
- Collect: The function is used to create a Power Apps collection
- CollProductModel: The name of the new collection
- ‘Product Model’: The name of the SharePoint list.
That’s it! Let’s click on the button while clicking on the Alt key. Once the button is clicked, it will create the collection within the Power Apps.
To check the collection, click on the ellipses (…) on the top bar of the Power Apps screen > Collections.
When we click on the Collections, it will redirect to the screen where we can find the collection that we have created from the SharePoint list shown below:
This is how to create the PowerApps collection from the SharePoint list.
Also Read: Power Apps Timer Control Examples
Power Apps show collection SharePoint list value
Once the collection is built, it allows us to display the collected data within the Power Apps screen. In this section, we will see how to show the Power Apps collection retrieved from the SharePoint list value.
We can display the data via a Power Apps data table or gallery control. Suppose, we are going to use the Power Apps data table control to display the above Power Apps collection that we have created, i.e., CollProductModel.
Set the Items property of the data table as CollProductModel. Add the fields to the data table. Now the collected data will be visible as shown below:
This is how to show Power Apps collection value from the SharePoint list.
Check: Power Apps Notify() function [How to use with examples]
Power Apps collection SharePoint list choice column
In this section, we will see how to create a Power Apps collection using the SharePoint choice column.
We have a choice field named “Manufacturer” on the above SharePoint list i.e., Product Model.
Let’s create a collection using the above SharePoint choice column via a button click. For this, the required steps are:
- On the Power Apps screen, add a button control.
- Set the Text as “Create collection using SP choices“.
- Insert the below expression on the button’s OnSelect property.
OnSelect = Collect(colManufactures, Choices('Product Model'.Manufacturer))
Where,
- colManufactures is the name of the new collection to store the choices.
- ‘Product Model’.Manufacturer is the name of the choice column of the SharePoint list.
- Next, add a Power Apps data table control to the screen to display the collected data ad set the Items as colManufacturers.
- Add the field from the Fields > Edit fields > +Add fields > Value.
- Initially, the data table will not display the collected data. For this, first, click on the button. As a result, it will create a collection using the SharePoint choice field.
- Then, it will display those data within the data table shown below:
This is how to create a Power Apps collection using the SharePoint list choice column.
Read: Power Apps Filter With Date Picker
Power Apps collection SharePoint list column
We can create a collection using the information from the SharePoint list column by using the Power Apps collection. whether there is only one column or several. This section will demonstrate how to use the SharePoint list column to create a Power Apps collection (s).
The steps below describe how to create the Power Apps collection using the Product Model SharePoint list mentioned above:
- On the Power Apps screen, add a button control.
- Set the Text property as “Click here to create collection“
- Insert the following expression on the OnSelect property of the
OnSelect = ClearCollect(CollListColumns, ShowColumns('Product Model', "Title", "OrderedBy"))
Where,
- CollListColumns: The name of the new collection to store the data from the SharePoint list.
- ‘Product Model’: The name of the SharePoint list
- “Title”, “OrderedBy”: The name of the SharePoint list columns to create the collection.
- We can see, initially, it will create a blank collection within the Power Apps; to collect the data in the collection click on the button.
- Then add a data table to the screen and set the Items as CollListColumns.
- Add the fields from the Fields > Edit Fields > Add field.
- On the above data table, we can see it will create an error while displaying the Ordered By i.e., people column. To resolve this, click on the error icon > update the formula as below:
Text = ThisItem.OrderedBy.DisplayName
Now, it will show the display names of the respective person.
This is how to create a Power Apps collection using the SharePoint list column(s).
Also, have a look: How To Set Default Date in Power Apps Date Picker
Power Apps collection SharePoint list person field
Here, we’ll look at many approaches to creating a collection utilizing the SharePoint person field. There is a person field or people column i.e., ‘Ordered By’ within the above-mentioned SharePoint list named Product Model.
Approach 1: Create a collection using the person field
To create a collection using the person field within the Power Apps, the following steps are:
- On the Power Apps screen, add a button control.
- Set the Text property as “Create collection using People field“.
- Insert the below expression on the button’s OnSelect property.
OnSelect = Collect(CollOrderedBy, 'Product Model'.'Ordered By')
That’s it! When you click the button in the Power Apps collection area, a collection containing the data from the person field will be created.
In the above collection, each data is combined with email, display name, job title, and picture of the respective people. Suppose, if we click on the collected data, then it will appear like below:
- Let’s add a vertical gallery to display these collected data. For this, add a vertical gallery to the Power Apps screen.
- Set the Items property as CollOrderedBy and layout as Title to display only the person’s display name.
- Insert the below expression on the Text property of the Title field (under the gallery).
Text = ThisItem.'Ordered By'.DisplayName
This is how to create a power Apps collection using the SharePoint person field.
Read How to get current date in Power Apps?
Approach 2: Create a collection using the person field and another field
Apart from the “display name,” we can also display the email of the respective person from the SharePoint people field.
Assume that we will create a Power Apps collection that will display the email of the respective person and the Title field from the SharePoint list.
To work with this requirement, the following steps are needed:
- On the Power Apps screen, add a button control.
- Set the Text property as “Create Collection from person column”.
- Insert the below expression on the button’s OnSelect property.
OnSelect = ClearCollect(
collPerson,
ShowColumns(
AddColumns(
'Product Model',
"Ordered By Email",
'Ordered By'.Email
),
"Title",
"Ordered By Email"
)
)
Where,
- collPerson is the name of the new collection.
- ‘Product Model’ is the name of the SharePoint list.
- “Ordered By Email” is the name of the new column to store the emails.
- ‘Ordered By’.Email is the name of the SharePoint people column with email.
- “Title” is the name of the SharePoint field.
Let’s click on the button while clicking on the Alt key. We can see a collection named collPerson is created in the Power Apps having the Title and emails of the respective person who ordered that product.
This is how to build a PowerApps collection SharePoint list person field.
Read out: How to use Power Apps date picker
Power Apps collection SharePoint group field
In this section, we will see how to create a Power Apps collection using the SharePoint group field. That means the person field has multiple people. There is a SharePoint list named Projects having a person field i.e., ProjectHandler that allows multiple people shown below:
Now, we will create a Power Apps collection using the above SharePoint grouped person field which will come individually. For this, the following steps are:
- On the Power Apps screen, add a button control.
- Set the Text property as “Create collection from SharePoint group“.
- Insert the below expression on the button’s OnSelect property.
OnSelect = ClearCollect(
CollProjectHandler,
Ungroup(
Projects,
"ProjectHandler"
)
)
Where,
- CollProjectHandler is the name of the new collection.
- Projects is the name of the SharePoint list.
- “ProjectHandler” is the name of the SharePoint person field.
Let’s click the button to build the collection, which will contain each individual person’s details from the SharePoint grouped column.
This is how to create a Power Apps collection using the SharePoint group field.
Read How To Use Power Apps Image Control
Power Apps collection SharePoint list limit
While using a SharePoint list to create a Power Apps collection, there are some restrictions. Let’s talk about the restrictions on the Power Apps collection that were pulled from the SharePoint list.
- We will get a warning issued if the item exceeds its limit which is officially known as a Delegation warning.
- That means a data source can only have a maximum of 500 items added to it. The PowerApps won’t let us add anything if we add more than 500.
- To overcome this limit issue, we need to increase the total item limit inside the Power Apps settings. On the Power Apps screen, click on Settings > General > Data Row Limit > 1500.
The disadvantage of this method is that it only allows values up to 2000. This approach won’t work if the data source has more than 2000 items. In such a situation, we must use static data rather than continuing with this strategy.
Check out: How to use Power Apps Check Box Control
Power Apps collect large SharePoint list
If the Share Point list has a large data source, do you wonder how to establish a Power Apps collection? The Power Apps collection currently enables a maximum of 2000 entries. So how do we deal with it?
The Microsoft Power Apps community has contributed a number of responses. To learn how to generate a collection using a large data set, we advise you to click on the abovementioned website.
Power Apps collection SharePoint image
In this section, we will see how to create a Power Apps collection using the SharePoint image field. Suppose, there is an Image field named “Model Image” in the above-mentioned SharePoint list i.e., Product Model. That column contains the images of the respective product shown below:
Using the above SharePoint Image column, we will build a collection that will store all the images as well as the respective title within the Power Apps. For this, the required steps are:
- Add a button control to the Power Apps screen.
- Set the Text as Click Here.
- Insert the below expression on the button’s OnSelect property.
OnSelect = ClearCollect(
collProductModel,
ShowColumns('Product Model', "Title", "ModelImage"))
Where,
- collProductModel: The name of the new collection to store the product’s image and title.
- ‘Product Model’: The name of the SharePoint list
- “Title”, “ModelImage”: The name of the SharePoint list default and image columns
As soon as we press the button, a collection including the product’s titles and images is created within the Power Apps collection section.
To display the images in the Power Apps screen, add a vertical gallery to the screen. Keep the layout as Image and title.
Set the Items property as collProductModel. Now the gallery will appear as shown below:
This is how to create a Power Apps collection using the SharePoint image field.
Power Apps collection SharePoint list attachments
Do you want to build a Power Apps collection using the SharePoint list attachments field? But unfortunately, Power Apps does not allow the creation of collections using list attachments.
As an alternative, we could only access the attachments for a SharePoint List item from the Attachments control of an Edit form.
We recommend you visit the mentioned link to get ideas about building the Power Apps collection using the SharePoint list attachments.
Furthermore, you may like some more Power Apps tutorials:
- Power Apps Collection Using Excel [Complete Guide]
- Power Apps Collection Removes Items [With Examples]
- Power Apps Checkbox control within Gallery
- How To Set Default Value in Power Apps List Box Control
- Power Apps Listbox items from SharePoint list
- How to use Power Apps List box control?
- Power Apps combo box default value
- Power Apps Combo box with SharePoint list
- Power Apps combo box filter
Conclusion
From this Power Apps Tutorial, we learned all about creating a Power Apps collection using the SharePoint list based on the following scenarios such as:
- Power Apps collection SharePoint list
- Power Apps show collection SharePoint list value
- Power Apps collection SharePoint list choice column
- Power Apps collection SharePoint list column
- Power Apps collection SharePoint list person field
- Power Apps collection SharePoint group field
- Power Apps collection SharePoint list limit
- Power Apps collect large SharePoint list
- Power Apps collection SharePoint image
- Power Apps collection SharePoint list attachments
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.