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.
I have a SharePoint Online list as ” Loan Approval” that has various columns like:
|Choice [Car Loan, Gold Loan, Home Loan]
|Loan Applied Date
|Date and time
|Approved or Not
|Loan Handled by
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:
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))
- coltoggle = New collection name
- Loan Approval = SharePoint list name
- Approved or Not = SharePoint list yes/no type column name
- Now, insert a Data table -> Set its Items property to:
- coltoggle = Collection name
- 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.
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.
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.”
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.
- colFilter = Provide the collection name
- Loan Approval = SharePoint list name
- Insert a Gallery control -> Set its Items property to:
'Approved or Not' = Boolean(1) And 'Loan Type'.Value = "Home Loan"
- colFilter = Collection name
- Approved or Not = SharePoint list yes/no column
- Loan Type = SharePoint list choice column
- Home Loan = SharePoint list choice column value
- 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:
This way, I filtered the Power Apps collection using the yes/no column with the AND feature.
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:
- Display Power Apps Collection Data in Gallery?
- How to Filter Power Apps Collection By Choice Column?
- Filter Power Apps Collection By Person/Group Column
- Filter Power Apps Collection By Logical Operators
- How to Filter Power Apps Collection By Date?
Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.