How to Filter Power Apps Collection By Yes No Column?

Did you have a requirement to filter the Power Apps collection using the SharePoint Yes/No column? If Yes, Then follow this complete tutorial!

In this Microsoft Power Apps tutorial, I will explain how to filter Power Apps collection by Yes No column with a simple example.

Moreover, we will see how to filter the Power Apps collection using the Yes/No column with the AND operator.

How to Filter Power Apps Collection By Yes No Column

This section will discuss filtering the Power Apps collection by the SharePoint Yes No column.

Example:

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

Column NameData Type
NameTitle
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
Filter collection using Yes or No column in Power Apps

I created a Power Apps blank canvas and added a Toggle control, a search icon, and a Data table.

The toggle control is connected to the above SharePoint list yes/no column. When a user toggles and switches a value to Yes, the data table control filters and displays the approved records.

Let’s say I toggle switch a value as “Yes.” Using the toggle, the data table displays all the records that are approved, as shown below:

Power Apps filter collection using SharePoint list yes or no column

Let us see how to achieve it:

  • On the Power Apps screen, insert a Toggle control -> Set its OnChange property to:
ClearCollect(coltoggle,Filter('Loan Approval','Approved or Not'=true))

Where,

  1. coltoggle = New collection name
  2. Loan Approval = SharePoint list name
  3. Approved or Not = SharePoint list yes/no type column name
How to filter collection using Yes or No column in Power Apps
  • Now, insert a Data table -> Set its Items property to:
coltoggle

Where,

  1. coltoggle = Collection name
Filter Power Apps collection using SharePoint list yes or no column
  • Save, Publish, and Preview the app. When the user provides a toggle control to yes, the data table will filter and provide particular data based on approved loans.
Power Apps filter collection using toggle control

This way, we can filter a Power Apps collection by toggle control from a SharePoint list.

Filter Power Apps Collection Using Yes No Column With the AND Operator

Let me explain how to filter the Power Apps collection using the yes/no column with the AND feature.

For Example,

I added a Gallery control on the Power Apps screen and created a Power Apps collection using the above SharePoint list. We will filter the gallery from that collection and display the approved records using the yes/no column that is “Home Loan.”

How to Filter Power Apps Collection By Yes No 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 Yes No Column
  • Insert a Gallery control -> Set its Items property to:
Filter(
    colFilter,
    'Approved or Not' = Boolean(1) And 'Loan Type'.Value = "Home Loan"
)

Where,

  1. colFilter = Collection name
  2. Approved or Not = SharePoint list yes/no column
  3. Loan Type = SharePoint list choice column
  4. Home Loan = SharePoint list choice column value
Filter PowerApps Collection By Yes No Column
  • Save, Publish, Reload, and Preview the app. The gallery will filter and display the records based on the approved loans, which are “Home Loan” as shown below:
Power Apps filter collection using yes or no column

This way, I filtered the Power Apps collection using the yes/no column with the AND feature.

Conclusion

This Power Apps tutorial provided complete information about filtering a Power Apps collection using the SharePoint Yes No column.

Also, I have covered how to filter a Power Apps collection using the Yes No column with the AND operator.

You may also like: