Filter SharePoint List Items in Power Apps [5 Various Examples]

Many people use SharePoint lists to store important data, but sometimes it can be challenging to find exactly what you need when the list is very large, even when using Power Apps as well.

This way, you can quickly see only the information that matters most to you, without having to scroll through everything. In this blog post, I will explain how to filter SharePoint list items in Power Apps easily.

Additionally, we will discuss the topics below:

  • Power Apps filter SharePoint list items by ID
  • Power Apps filter SharePoint list items by text field
  • Power Apps filter SharePoint list items by choice value
  • Power Apps filter SharePoint list items StartsWith
  • Power Apps filter & collect specific columns only from the SharePoint list

Filter SharePoint List Items in Power Apps

There is a SharePoint list named ‘IT Help Desk’ having various columns like:

ColumnData type
Request IDNumber
SubjectSingle line of text (By default, Title column)
Request DateDate time
CategoryChoice (Servers, Basic Software, User Workstation, etc.)
PriorityChoice
ProgressNumber

Refer to the screenshot below.

Filter SharePoint List Item in PowerApps

So let’s get started!

Power Apps Filter SharePoint List Items By ID

Here, in the screenshot below, I want to filter the SharePoint list items based on the Request ID field, which is a number type. (You can also take the default SharePoint ID column)

Whenever the user provides the Request ID (Text input) and clicks on the Search button, this Power Apps gallery will filter accordingly.

Filter SharePoint List Items in Power Apps
  1. To achieve this, select the Search button and set its OnSelect property as:
OnSelect = ClearCollect(
    colHelpDesk,
    Filter(
        'IT Help Desk',
        'Request ID' = Value(txtReqID.Text)
    )
);

Where,

  • colHelpDesk = Collection name
  • txtReqID = Text input control name (As Request ID is a number field, so we need to add the Value function into it)
Filter SharePoint List Items in PowerApps
  1. Next, insert a Data table and set its Items property to the collection.
Items = colHelpDesk
Filter SharePoint List Items Power Apps
  1. Save, publish, and preview the app. Enter any request ID that you want to filter and tap the Search button. You can see that the data table will filter accordingly.

Power Apps Filter SharePoint List Items By Text Field

Similarly, we can filter the SharePoint list items based on the text field in Power Apps. Once you enter the subject or text and click the Search button, the data table will filter out as shown in the picture below.

Power Apps Filter SharePoint List Items By Text

To do so, write the formula below on the Search button’s OnSelect property:

OnSelect = ClearCollect(
    colHelpDesk,
    Filter(
        'IT Help Desk',
        Title = txtSubject.Text
    )
);

Where,

  • Title = SharePoint text field that you want to filter
  • txtSubject = Text input control
Power Apps Filter SharePoint List Items By Text Field

This is how to work with Power Apps filter SharePoint list items by text field.

Power Apps Filter SharePoint List Items By Choice Column

To filter SharePoint list items by a Choice field in Power Apps, it’s better to use a Dropdown control and a button.

When a user selects a choice value from the dropdown and clicks the Search button, the data table filters out and displays the filtered records accordingly.

Power Apps Filter SharePoint List Items By Choice Column
  1. Add a Dropdown control and set its Items property:
Items = Choices('IT Help Desk'.Category)

Where,

Category = SharePoint Choice Column

The above code helps you to get all the choice values from the SharePoint choice field

Power Apps Filter SharePoint List Items by Choice value
  1. Select the Search button and apply the formula below on its OnSelect property as:
OnSelect = ClearCollect(
    colHelpDesk,
    Filter(
        'IT Help Desk',
        Category.Value = dd_Category.Selected.Value
    )
);

dd_Category = Dropdown control name

Power Apps Filter SharePoint List Items based on Choice field
  1. Select the Data table control and set its Items property to the collection.
Items = colHelpDesk
Power Apps Filter SharePoint List Items based on Choices

This is how to filter SharePoint list items by the choice field in Power Apps.

Power Apps Filter SharePoint List Items StartsWith

Let’s say, whenever you start typing in the text box (either in upper or lower case), you want to filter the SharePoint list records in Power Apps.

In this case, we will use the Power Apps StartsWith function, which helps test whether a text string begins with another.

Power Apps Filter SharePoint List Items StartsWith

To work around this, select the Data table control and apply the code below to its Items property:

Items = Filter(
    'IT Help Desk',
    StartsWith(
        Title,
        txt_Subject.Text
    )
)

Where,

txt_Subject = Text input field where you will enter the request subject/title

How to Filter SharePoint List Items in Power Apps

Save, publish, and preview the app. Start typing something into the text box; you can see the data table will filter out accordingly.

Power Apps Filter & Collect Specific Columns Only From SharePoint List

In Power Apps, we can also filter and collect only some specific columns from the SharePoint list.

Let’s say I want to filter the SharePoint list items based on the ID field and view only specific columns in the Power Apps Data table control, as shown below.

Power Apps Filter Specific Columns Only From SharePoint List
  1. For this, we will use the Power Apps ShowColumns() function. Apply the code below to the Search button’s OnSelect property:
OnSelect = ClearCollect(
    ColItems,
    ShowColumns(
        Filter(
            colHelpDeskData,
            'Request ID' in txtReqID_1.Text
        ),
        'Request User',
        'Request Date',
        Priority
    )
)

Where,

  • ColItems = Provide the collection name
  • colHelpDeskData = This is the collection that contains all the SharePoint data
  • txtReqID_1.Text = Text input control name
  • ‘Request User’, ‘Request Date’, Priority = These are the specific SharePoint columns that I want to filter and collect

NOTE:

If you are directly using the SharePoint list in the above list, a delegation warning issue will appear for large data set. To avoid this issue, you can create a collection using the SharePoint list and store the data inside of it.

We can create the Power Apps collection either App’s OnStart property or Screen’s OnVisible property.

Power Apps Filter Specific Columns From SharePoint List
  1. Select the Data table control and set its Items property to the collection.
Items = ColItems

Additionally, include those specific SharePoint fields inside the data table.

Power Apps Filter and collect Specific Columns From SharePoint List
  1. Save, publish, and preview the app. Enter any request ID that you want to filter and collect. Click on the Search button. You can see that the data table filters accordingly and displays the relevant details. (Also, check the Power Apps collection)

Power Apps filter SharePoint list items helps you see only the information you want. It makes your app easier to use and saves time. I hope this guide helps you learn how to filter your data in Power Apps.

Also, you may like some more Power Apps articles:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…