Power Apps Create Collection Using SharePoint List

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:
Power Apps collection SharePoint list
Power Apps collection SharePoint list
  • Prepare a blank Power Apps canvas app and connect the above SharePoint list to the canvas app.
Connect SharePoint list to Power Apps canvas app
Connect SharePoint list to Power Apps 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,

  1. Collect: The function is used to create a Power Apps collection
  2. CollProductModel: The name of the new collection
  3. ‘Product Model’: The name of the SharePoint list.
Power Apps collection from SharePoint list
Power Apps collection from 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.

PowerApps collection SharePoint list
PowerApps collection SharePoint list

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:

Create PowerApps collection from SharePoint list
Create PowerApps collection from SharePoint list

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:

Power Apps show collection SharePoint list value
Power Apps show collection SharePoint list value

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.

Power Apps collection sharepoint list choice column
Power Apps collection SharePoint list choice column

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,

  1. colManufactures is the name of the new collection to store the choices.
  2. ‘Product Model’.Manufacturer is the name of the choice column of the SharePoint list.
PowerApps collection sharepoint list choice column
PowerApps collection Sharepoint list choice column
  • 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:
Create Power Apps collection using sharepoint list choice column
Create Power Apps collection using SharePoint list choice column

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,

  1. CollListColumns: The name of the new collection to store the data from the SharePoint list.
  2. ‘Product Model’: The name of the SharePoint list
  3. “Title”, “OrderedBy”: The name of the SharePoint list columns to create the collection.
Power Apps collection sharepoint list column
Power Apps collection SharePoint list column
  • 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.
PowerApps collection sharepoint list column
PowerApps collection SharePoint list column
  • 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.

Create Power Apps collection using sharepoint list column
Create a Power Apps collection using SharePoint list column

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')
Power Apps collection sharepoint list person field
Power Apps collection SharePoint list person field

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.

PowerApps collection sharepoint list person field
PowerApps collection SharePoint list person field

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:

Create PowerApps collection SharePoint list person field
Create PowerApps collection SharePoint list person field
  • 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
create Power Apps collection SharePoint list person field
create Power Apps collection SharePoint list person field

This is how to create a power Apps collection using the SharePoint person field.

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,

  1. collPerson is the name of the new collection.
  2. ‘Product Model’ is the name of the SharePoint list.
  3. “Ordered By Email” is the name of the new column to store the emails.
  4. ‘Ordered By’.Email is the name of the SharePoint people column with email.
  5. “Title” is the name of the SharePoint field.
Build Power Apps collection SharePoint list person field
Build Power Apps collection SharePoint list person field

Let’s clcik pn 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.

Build PowerApps collection SharePoint list person field
Build PowerApps collection SharePoint list person field

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:

Power Apps collection sharepoint group field
Power Apps collection SharePoint group field

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,

  1. CollProjectHandler is the name of the new collection.
  2. Projects is the name of the SharePoint list.
  3. “ProjectHandler” is the name of the SharePoint person field.
PowerApps collection SharePoint group field
PowerApps collection SharePoint group field

Let’s click the button to build the collection, which will contain each individual person’s details from the SharePoint grouped column.

Power Apps collection using SharePoint group field
Power Apps collection using SharePoint group field

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.
Power Apps collection SharePoint list limit
Power Apps collection SharePoint list limit

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:

Power Apps collection SharePoint image
Power Apps collection SharePoint image

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,

  1. collProductModel: The name of the new collection to store the product’s image and title.
  2. ‘Product Model’: The name of the SharePoint list
  3. “Title”, “ModelImage”: The name of the SharePoint list default and image columns
PowerApps collection SharePoint image
PowerApps collection SharePoint image

As soon as we press the button, a collection including the product’s titles and images is created within the Power Apps collection section.

Build Power Apps collection SharePoint image
Build Power Apps collection SharePoint image

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:

Power Apps collection using SharePoint image
Power Apps collection using SharePoint image

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:

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
>