How to Bind Power Apps Dropdown Control From SharePoint Yes No Column?

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.

Scenario:

  • I have a SharePoint Online List named “Travel Requests”. This list contains the below fields.
Column NameData Type
Trip TitleThis is a Title column with a single line of text. I just renamed it to “Trip Title”
DestinationLocation
Travel Start DateDate and time
Travel End DateDate and time
ApprovedYes/No
How to Bind Power Apps Dropdown Control from SharePoint yes no column
  • 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
)

Where,

drp_Travels = Dropdown control name

Display SharePoint Yes No Field in Power Apps Dropdown
  • 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.

Solution:

  • Select the respective Dropdown control and set its Items property as:
Items = Distinct(
    'Travel Requests',
    If(
        Approved = true,
        "Yes",
        "No"
    )
)

Where,

  1. ‘Travel Requests’ = SharePoint Online List
  2. If() = This function evaluates multiple unrelated conditions in Power Apps
  3. Approved = SharePoint Yes No field
  4. “Yes”, “No” = Provide the value that you want to view in the dropdown menu
Power Apps Filter Gallery By Dropdown based on SharePoint Yes No Field
  • 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
    )
)

Where,

  1. drp_TravelRequests = Dropdown control name
Power Apps Gallery Filter By Dropdown based on SharePoint Yes No Field
  • 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.
Power Apps Gallery Filter By Dropdown based on the SharePoint Yes No Field

This is how to filter a Power Apps gallery by dropdown based on the SharePoint yes/no field.

Conclusion

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: