A few weeks ago, I received a requirement in Power Apps to filter the gallery items based on dropdown lookup values. All the dropdown values must be retrieved from the SharePoint list lookup column.
In this article, I will show you how to bind SharePoint lookup column in Power Apps dropdown. Also, how to filter gallery items based on those dropdown lookup values.
Bind SharePoint Lookup Column in Power Apps Dropdown
Let’s first see how to bind the SharePoint lookup column in the Power Apps dropdown control. I created two SharePoint lists: one for storing department details and the other for storing team details.
This is the second SharePoint list, which stores the team’s details. Here, DepartmentName is the Lookup column taken from the Department List.
Refer to the example below; the SharePoint list lookup column values are displayed in the Power Apps dropdown control.
To do this, follow the steps below.
Note: You must create a SharePoint list with Lookup column from another SharePoint list.
1. Connect with the SharePoint list in Power Apps from the Data section.
2. Add a Dropdown control from the +Insert tab in Power Apps. Then, add the formula below to the Items property of the dropdown control.
Choices([@'Teams List'].DepartmentName)
Here, change Teams List with your SharePoint list name and DepartmentName with the SharePoint Lookup column name.
3. Now, save and preview the app once. The SharePoint lookup column values will be displayed in the Power Apps dropdown control.
Follow the steps below to filter the gallery items based on this Power Apps dropdown control.
4. Add the Verticle Gallery control in the Power Apps. Then, add the formula below to the gallery’s Items property.
Filter('Teams List',DepartmentName.Value=drp_Dept.Selected.Value)
This formula will filter Power Apps gallery items based on dropdown value.
5. Look at the example below; the gallery items are filtered based on the dropdown values.
I hope you understand how to bind the Power Apps dropdown control to SharePoint list lookup column values and filter gallery items based on these dropdown values.
Take this article as a reference while trying to bind the SharePoint list lookup column values in the Power Apps dropdown.
Also, you may like:
- Power Apps drop-down values from the SharePoint list person field
- Sort Power Apps Combo Box Items
- Add a blank value to the Power Apps dropdown control
- Add all options in the Power Apps dropdown control
- Power Apps cascading dropdown
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com