cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pwrappr01
Level: Powered On

How do I filter a SharePoint Lookup list based on text entered in a search box?

I have two SharePoint lists. List A has a series of names. List B shows who is assigned one of those names. When users are adding entries to List B, I need my PowerApp to let users search for a word such as "Microsoft" and have it then filter the drop-down lookup choices from List A so that only entries that contain "Microsoft" are available for selection.

 

I am very new to PowerApps and would appreciate any help y'all can provide.

9 REPLIES 9
Super User
Super User

Re: How do I filter a SharePoint Lookup list based on text entered in a search box?

@pwrappr01 

You mention a DropDown...if so, have you considered using a ComboBox?  The ComboBox provides this functionality.

 

If you add a ComboBox and

1) set the Items to ListA.  Then set the Primary Text and the Search Field to the column in ListA that has the names you want to search.

2) Set the isSearchable property (or Allow Search) to true

 

You will now have a dropdown that users can type a name such a "Microsoft" and it will narrow the list down as they type.

 

I hope this is clear and helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
pwrappr01
Level: Powered On

Re: How do I filter a SharePoint Lookup list based on text entered in a search box?

@RandyHayes ,

 

That is very helpful. Is there any way to change the behavior of the search? I noticed it seems to default to a "Starts With".

Super User
Super User

Re: How do I filter a SharePoint Lookup list based on text entered in a search box?

@pwrappr01 

Hmmm, I've never noticed that...it searches full text from all I've ever done.

Here in this screenshot, I am (with all the same parameters I mentioned to you), searching for "th" in a list.  My list items are full text searched, not StartsWith.

pwrappr01.png

 

I've never tested this next statement to confirm, but it is possible that the functionality of that combobox may differ on different players and/or browsers.  In this case I am in the designer and using Edge.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
pwrappr01
Level: Powered On

Re: How do I filter a SharePoint Lookup list based on text entered in a search box?

@RandyHayes,

 

Strange. That is certainly not what I am seeing with the search. I have the SharePoint list added in Teams and am seeing the same result there when I perform a search as when I perform a search in Chrome, Edge, and Firefox.

 

Oddly enough, the search is not even retrieving known results. For example, I search "Exchange", and I get no results even though there are at least 2 of which I know in the list.

Super User
Super User

Re: How do I filter a SharePoint Lookup list based on text entered in a search box?

@pwrappr01 

Are you actually seeing "Exchange" in the list...without typing anything into the search?  I would check that first.

Make sure you have the Primary Text and the Search Field properties set correctly on your ComboBox.  This is very important.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
pwrappr01
Level: Powered On

Re: How do I filter a SharePoint Lookup list based on text entered in a search box?

@RandyHayes,

 

I do indeed. I can scroll and see multiple entries containing "Exchange" in the list. 

 

Regarding the Primary Text and Search Field settings, Value is the only option for both drop-downs.

Super User
Super User

Re: How do I filter a SharePoint Lookup list based on text entered in a search box?

@pwrappr01 

That is a bit bizarre that you see them in the list but when you type they disappear as options.

 

The reason you only see value is because you are most likely doing something like Distinct in your Items property for the ComboBox.

That shouldn't make any difference, but, just to test, try setting it to your datasource instead and then set the fields (display and search) to be the column you want and see if the behaviour is any different.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
pwrappr01
Level: Powered On

Re: How do I filter a SharePoint Lookup list based on text entered in a search box?

@RandyHayes ,

 

I thought so too. As far as what is currently in the Items field, it is another Choices('Name Tracker'.'Entry Name') formula. When I try to set it to the base data source ('Name Tracker'), I end up not even being able to set the search field to the 'Entry Namecolumn as it disappears from the list.

 

I also get a warning triangle that says "Search may not work well on large datasets". The source list only has under 600 entries.

Super User
Super User

Re: How do I filter a SharePoint Lookup list based on text entered in a search box?

@pwrappr01 

Ah...first, the size of the data.  You mention 600 items...is it under 500?  The default limit is 500.  If you need to bump that up to test anything, change it in your app settings.  But, this should not be an impact on the behaviour that you are seeing.

 

What kind of column is Entry Name?  

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 312 members 4,760 guests
Please welcome our newest community members: