How to Filter Power Apps Collection By Choice Column?

Have you ever filtered the Power Apps collection by choice column? If Not, Then follow this complete tutorial.

In this Power Apps tutorial, I will show you how to filter Power Apps collection by choice column. And also, we will discuss some more related to this topic like:

  • How to filter Power Apps collection using the choice field value
  • Filter Power Apps collection using the choice column value with AND operator

How to Filter Power Apps Collection By Choice Column

I will show you how to filter the Power Apps collection by choice column.

For Example, I have a SharePoint Online list as ” Loan Approval” that has various columns like:

Column NameData Type
NameTitle [Single line of text]
Loan TypeChoice [“Car Loan,” “Gold Loan,” “Home Loan“]
Credit ScoreNumber
Salary Currency
Loan Applied DateDate and time
Approved or NotYes/no
ID ProofImage
Loan Handled byPerson/group

Refer to the image below.

Power Apps Filter Collection using SharePoint List

I created a Power Apps Canvas app and added a Drop-down control, a search icon, and a Gallery control.

The dropdown control is connected to the above choice column [Loan Type]. When a user selects a value from the drop-down control and clicks the Search icon, the gallery will filter and display the relevant records based on the selected drop-down value.

I selected a “Home Loan” value from the drop-down control and clicked a Search button. Then, the gallery will display the records based on all the Home Loans.

How to Filter Power Apps Collection By Choice Column

Let me show you how to achieve this:

  • On the Power Apps screen, insert a Drop-down control -> Set its Items property to:
Choices('Loan Approval'.'Loan Type')

Where,

  1. Loan Approval: SharePoint list name
  2. Loan Type: SharePoint list choice column name
How to filter Power Apps collection by drop-down control from SharePoint list
  • Beside the drop-down control, insert a Search icon -> Set its OnSelect property to:
ClearCollect(
    coldrp,
    Filter(
        'Loan Approval',
        'Loan Type'.Value = drp_LoanType.Selected.Value
    )
)

Where,

  1. coldrp: Provided new collection name
  2. Loan Approval: SharePoint List name
  3. Loan Type: SharePoint list choice column name
  4. drp_LoanType: Drop-down control name
Power Apps Filter collection by drop-down control SharePoint list
  • Insert a Gallery control -> Set its Items property to:
coldrp

Where,

  1. coldrp = Collection Name
How to filter Power Apps collection by choice column SharePoint list
  • Save, Publish, and Preview the app. Now, based on the user selecting a value from the drop-down and clicking on a search icon. The gallery control will filter and display the relevant records based on the selected value.
How to filter Power Apps collection by drop-down control SharePoint online list

This way, we can filter the Power Apps collection based on the dropdown control.

Power Apps filter collection by choice column value

This section will show you how to filter the Power Apps collection using the choice field value.

For Example, On the Power Apps screen, I have added a Data table whenever the user loads an app; the data table will filter and display the records based on the SharePoint list choice column value.

Let’s say I want to display the records that are “Gold Loan.” So, I have created a collection for it. When the screen loads, the data table will automatically filter and display the records that are “Gold loan.”

Power Apps filter collection by choice column

Let me show you how to achieve this:

  • On the Power Apps Screen, OnVisible property -> Create a Power Apps collection using the above SharePoint list.
ClearCollect(colFilter,'Loan Approval')

Where,

  1. colFilter = Provide the collection name
  2. Loan Approval = SharePoint list name
Filter Power Apps collection by choice column value
  • On the Power Screen, insert a Data table -> Set its Items property to:
Filter(
    colFilter,
    'Loan Type'.Value = "Gold Loan"
)

Where,

  1. colFilter = Collection name
  2. Loan Type = SharePoint list choice column name
  3. Gold Loan = SharePoint list choice column value
How to filter Power Apps collection by choice column value
  • Save, Publish, Reload, and Preview the app. The data table will filter and display the records based on the SharePoint list choice column value “Home loan.”
Power Apps filter collection by choice column value

We can achieve this by filtering the Power Apps collection using the choice column value.

Power Apps Filter Collection Using Choice Column Value with AND Operator

Let me explain how to filter the Power Apps collection using the choice column value with the AND feature.

For Example, As in the above steps, we already created a Power Apps collection using the above SharePoint list. We will filter the data table from that collection and display the “Home Loan” records with credit scores over 700.

Filter Power Apps collection by choice column

Let me show you how to achieve this:

  • On the Power Apps screen, insert a Data table -> Set its Items property to:
Filter(
    colFilter,
    'Loan Type'.Value = "Gold Loan" And 'Credit Score' > 700
)

Where,

  1. colFilter = Collection name
  2. Loan Type = SharePoint list choice column name
  3. Gold Loan = SharePoint list choice column value
  4. Credit Score = SharePoint list number column name
Power Apps filter collection using choice column value with AND feature
  • Save, Publish, Reload, and Preview the app. The data table will filter and display the records based on the “Loan Type” value “Home loan” and “Credit Score” more significant than 700.
Filter Power Apps collection using choice column value with AND feature

This way, we can filter the Power Apps collection using the choice column value with the AND feature.

Conclusion

I hope this Power Apps tutorial helped you to filter the Power Apps collection using dropdown control and, moreover:

  • How to filter the Power Apps collection using the choice field value.
  • Filter the Power Apps collection using the choice column value with the AND operator.

Also, you may like some more Power Apps tutorials: