Can you bind the SharePoint Yes No field in the Power Apps Dropdown Control? Of course, Yes!
This Power Apps tutorial explains how to bind Power Apps Dropdown control from SharePoint Yes No column.
Also, I will discuss how to convert the Dropdown true false value to a Yes No value in Power Apps. Moreover, we will see how to filter the Power Apps gallery based on the Dropdown value.
How to Bind Power Apps Dropdown Control From SharePoint Yes No Column
A simple scenario will show us how to bind the Power Apps Dropdown control from the SharePoint Yes No Column.
- I have a SharePoint Online List named “Travel Requests”. This list contains the below fields.
|Column Name||Data Type|
|Trip Title||This is a Title column with a single line of text. I just renamed it to “Trip Title”|
|Travel Start Date||Date and time|
|Travel End Date||Date and time|
- In Power Apps, There is a Dropdown control and Gallery control. In the dropdown control, I retrieved yes/no field values from the SharePoint list.
- Here, the gallery displays filtered records based on the dropdown selected value.
- I have added the code below on the Dropdown’s Items property.
- But the dropdown only takes the true/false values instead of yes/no values as in the screenshot below.
Items = Filter( 'Travel Requests', Approved = drp_Travels.Selected.Value )
drp_Travels = Dropdown control name
- The Dropdown menu shows True and False values instead of Yes No values. However, it is not the right way to display the SharePoint yes/no field in the Power Apps dropdown. To overcome this, follow the below solution.
- Select the respective Dropdown control and set its Items property as:
Items = Distinct( 'Travel Requests', If( Approved = true, "Yes", "No" ) )
- ‘Travel Requests’ = SharePoint Online List
- If() = This function evaluates multiple unrelated conditions in Power Apps
- Approved = SharePoint Yes No field
- “Yes”, “No” = Provide the value that you want to view in the dropdown menu
- Then, select the Gallery control and set its Items property as:
Items = Filter( 'Travel Requests', Approved = If( drp_TravelRequests.Selected.Value = "Yes", true, drp_TravelRequests.Selected.Value = "No", false ) )
- drp_TravelRequests = Dropdown control name
- Save, Publish, and Preview the app. The dropdown will display the Yes/No field values.
- Also, the Power Apps gallery will display the filtered records based on the selected dropdown value, as shown below.
This is how to filter a Power Apps gallery by dropdown based on the SharePoint yes/no field.
This Power Apps tutorial taught us how to bind Power Apps Dropdown control from SharePoint Yes No column.
I also covered changing the true false value from the Dropdown to a yes or no value in Power Apps.
In addition, we learned how to use the Dropdown value to filter the Power Apps gallery.
Also, you may like some more Power Apps tutorials:
- Set Default Value in Power Apps Dropdown Control from SharePoint list
- Filter Power Apps Gallery By Multiple Dropdowns
- Power Apps Filter Gallery By Date Range Delegation
- Power Apps Filter Gallery By Month
- Power Apps Filter Gallery By Days
- Bind Power Apps Dropdown Items From Collection
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.