Kwizcom Forms

SharePoint 2013/2016/Online: List View Item filter based on Query String

SharePoint 2013 List View Item filter based on Query String

This SharePoint 2013 tutorial explains, how to do list view item filtering based on query string parameters. We will learn, list view advanced filtering based on query string in SharePoint 2013/2016/Online.

SharePoint list view item filtering based on query string parameters

In SharePoint, by default when you open AllItem.aspx page for any list or library it will come like below:

http://servername/Lists/MyTestingList/AllItems.aspx

But you can do some more advanced filtering by passing, field, and value in the browser as a query string parameter in the SharePoint list.

Syntax:

?FilterField1=[Internal Field Name]&FilterValue1=[Value to filter]

Let us say I have a SharePoint list which has two fields/columns as Title and Country like below:

sharepoint 2013 query string url filter web part multiple parameters
sharepoint 2013 query string url filter web part multiple parameters

Now to filter the list items based on query string we can write URL like

/Lists/MyTestingList/AllItems.aspx?FilterField1=Country&FilterValue1=IN

Your URL looks like below:

query string filter web part sharepoint online
query string filter web part sharepoint online

Here FilterField1 is to give the Column name and FilterValue1 is the value to filter. Here you can use operators like:

=,!=,>,< etc.

Or you can also write like below:

?FilterField1=Country&FilterValue1=IN&FilterOp1=eq

The results will appear like below:

SharePoint 2013 List View Item filter based on Query String
SharePoint 2013 List View Item filter based on Query String

SharePoint List Item Query String Filter on Multiple Values

If you want to filter on multiple values then you can pass values separated by a semicolon(;). See like below:

?FilterName=Country&FilterMultiValue=IN;SL

The URL Looks like below:

sharepoint 2013 query string url filter web part multiple parameters
sharepoint 2013 query string url filter web part multiple parameters

Here we are trying to filter records whose Country is IN and SL. So the results will appear like below:

SharePoint 2016 List View Item filter based on Query String
SharePoint 2016 List View Item filter based on Query String

Remember here the filter column name is the internal name of the column, not the display name.

You can add up to 10 FilterField and FilterValue like below:

/Lists/MyTestingList/AllItems.aspx?FilterField1=Country&FilterValue1=IN&FilterField2=Title&FilterValue2=Item-2……

SharePoint List Item Query String Filter on wildcard characters

You can also filter SharePoint list items filter items based on wildcard characters like below:

/Lists/MyTestingList/AllItems.aspx?FilterName=Country&FilterMultiValue=*IN*

You may like following SharePoint customization tutorials:

Hope this SharePoint tutorial explains, how to implement List View Item filtering based on Query String parameter value in SharePoint 2013/2016/Online.

Check out Best Alternative to InfoPath -> Try Now

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)

envelope
envelope

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →