How to filter the list items by using Search box webpart

Copper Contributor

I created a webpart page,and i added search box webpart and also i added list,Based on the search box whatever typing it will filter the list Items.

11 Replies

@Jaswanthi Which version of SharePoint are you using? Are you using classic experience or modern experience?

 

For classic experience, check if connected web parts in SharePoint helps you with your requirements OR you have to use search box and search results web part for more flexibility.

 

In modern experience, you can use PnP Modern Search web parts 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

classic experience
Im using the search box only,but it is not filtering the list,

@Jaswanthi You cannot directly filter list view (in list web part) using search box web part.

 

You have to use search box web part and connect it with search results web part with search query which brings results from only one list.

 

For more information, check:

  1. SharePoint 2013: Working with Result Sources to limit search results 
  2. How to use Search Box web part to search of list only 

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

In modern sharepoint ,I added PnP-Search box and a list webparts in site page,I made a connection to that list and Search-box the the list items are not filtering what ever i searched in search-box.Could you please provide me better approach to filter the list items using pnp-search box

@Jaswanthi Can you try using PnP Search Box web part with Search Results web part?

 

Search Results Web Part 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Ya i used Search box web part with Search Results Web part,But it is filtering whole sharepoint having that keyword in search box,I dont want all Sharepoint lists ,I want to filter the one list items.

@Jaswanthi You have to write search query using Path to retrieve/filter items from specific list only, like: 

 

path:https://contoso.sharepoint.com/sites/sitename/Lists/yourlist contentclass:sts_listitem

 

 

Check:

  1. Can Search Result Web Part be used to show items from a specific list? 
  2. Search Results - Data sources 

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Where i have to give that path?

@Jaswanthi You have to select "SharePoint Search" as a data source and pass the search query in Query text section.

Read the documentation given in 2nd link in my above response.


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

I tried in that way,but i didnt get the results