This SharePoint tutorial explains, how to use filter in content query web part from query string parameter in SharePoint 2013 Online.
SharePoint content query web part filter query string
Here I have a SharePoint 2013 online list which has one Title column. I want to filter the list data using a content query web part based on the query string parameter.
Here my requirement is, let say in the query string I passed a value ‘sharepoint’, then it should search in the particular list and it should return items which contains keyword ‘sharepoint’ in the Title column.
For this, I have created a SharePoint web part page and then I add a “Content Query” web part from the Content Rollup web part categories.
Then Edit the web part properties and in the Content Query Tool part, select the 3rd radio button which says (Show items from the following list:) and you can browse the particular list. I have selected my test list here.
Then go down and in the Additional Filters section, in Show items when:
- Select the Title column.
- Selection the condition as “contains”.
- Then give your parameter as [PageQueryString:ItemTitle]. Here ItemTitle is the query string parameter key.
Then click on OK. It should look like below:
Now when I browser the URL like below:
https://onlysharepoint2013.sharepoint.com/Pages/SearchTestPage.aspx?ItemTitle=sharepoint
It will return the result like below:
You may like following SharePoint tutorials:
- SharePoint 2013/2016/Online Content Search WebPart with Query String
- SharePoint copy files between document libraries using PowerShell with versioning
- How to disable quick edit in SharePoint list
- Export Excel Data to SharePoint list from Excel itself
- Create visual web part in SharePoint 2013/2016 using visual studio
- CAML Query Builder for SharePoint 2013/2016/Online
- In place records management in SharePoint Online/2013/2016
- How to use LINQ in SharePoint 2013/2016
- SharePoint Rest API Filter Example
- SharePoint 2013 SPListItem methods: Update(), SystemUpdate() and UpdateOverwriteVersion()
In this SharePoint search tutorial, we learned how to use query string filter in SharePoint Online 2013 content query web part.
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 SPGuides.com