1

First of all, this requirement is not about the Search Functionality of SharePoint.

I have a requirement wherein the user should be able to search a list.

At first I used the text filter web part to search in a specific column in my list, however, they dont want this kind of approach. What they want is that there will be a textbox and a dropdown that contains a list of columns (lookup to a list). the selected column is where the application will search or filter the list.

What approaches is best here?

Thanks!

  • Can you create custom web part using Visual Studio? – Slaven Semper Nov 9 '14 at 23:16
  • Yes this is what I am planning. if nothing easier works. I will create a textbox with dropdown containing the list of columns in the list where I will be searching. – Aventus Nov 10 '14 at 0:21
0

You can easily do this using query string and some html and JavaScript.

First create a view with query string filtering enabled. Then add a Content Editor web part. Using html add text box, drop-down, and a button. On button click form the query string and using JavaScript post to the same page.

  • my problem here is that it will only filter the items in the view. so if I have 10,000 items,and only 100 items per view (pagination) then it will only search/filter the items in the current view. please correct me if I am wrong. – Aventus Nov 10 '14 at 0:21
  • You are wrong, the filtered data will be on the entire items on the list. – Amal Hashim Nov 10 '14 at 0:22
  • oh okay, I stand corrected. Can you show me an example on how it is done? it should search a specific column using a wildcard search. so for example I entered letter "a" then it will return all result containing letter "a" – Aventus Nov 10 '14 at 0:44
  • 1
    You can use this for creating the view. – Amal Hashim Nov 10 '14 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.