Filter a SharePoint list using wildcards

There are a few filter webpart in SharePoint available but they don’t give you the possibility to filter your data with wildcards.

You can use this workaround to do this:

On your viewpage (for example Allitems.aspx) you add a CEWP (content editor webpart) where we will add some html and javascript code.

Open the source editor and add these lines of code:

<P>Enter your search query: <INPUT id=textboxSearchQuery size=75> <INPUT onclick=RedirectSearchQuery(); value=Search type=button> </P>
<P><EM>Use * as wildcard</EM></P>
<SCRIPT language=javascript type=text/javascript src=”/JQuery/jquery-1.5.min.js”></SCRIPT>

<SCRIPT language=javascript type=text/javascript>
//redirect seach query
function RedirectSearchQuery(){
var url=$(location).attr(‘href’).split(“?”)[0] + “?”;
var sQuery=$(“#textboxSearchQuery”).val();
url=url + “FilterName=Title&FilterMultiValue=” + sQuery

In my example I use jQuery so you must have this library somewhere on you site. The hack is this:

“&FilterName=Title&FilterMultiValue=” + sQuery
The FilterName parameter is the name of the column you want to filter. The FilterMultiValue parameter is your search/filter query. You can use * as wildcard.

I based my solution on the article on Praveen Kumar’s blog.