To Filter SharePoint List View Using Query String Web Part With No Code

Here, in the example, given below, I am going to use Projects Status list and a list view in "TaskStatusByProjects" page. The Project list view is used, which will show the different tasks, based on the project name mentioned in the query string.

Step 1

Create a "Project Status" list with the few columns, as shown below.



Select the "Custom List"



Provide the name of the list as "Project Status".



Use the "List Settings" to create the list of columns, given below.







Step 2

Add some values to the Project Status list by clicking the link "new task".



Provide the values in the "New Task" form.



Create sample records, as shown below.



Step 3

Go to "Site contents" and click on the "Site Pages" link.


Now, select the "Files" tab from the top ribbon, select the down arrow and then "New Document". Finally, select the "Web Part Page".



Create a Web Part page in the name "TaskStatusByProjects".



To edit the newly created page, use "Edit Page" in the top ribbon, as shown below.



Now, click on the "Add a WebPart" to a particular section. In the top ribbon, you can see the list of Web Parts available to add in the page.. Select one from the list and click "Add" button in the ribbon.

Step 4

Add "ProjectStatus" list view Web Part to the page.



Afterwards, add "Query String Filter" Web Part.



Now, configure the "Query String Filter" Web Part by clicking the "Open the tool pane".



Configure the list view Web Part, as shown below.



Step 5

Here is the final step and the important one, which creates the magic.

Connecting "Query String Filter" Web Part with the list view Web Part.



Select the "Send Filter values to" and you will see the pop-up, given below. Choose the options, as shown below.






Once you are done with the connection part, you can click "Stop Editing" to save the changes done in the page.



Now, finally we are able to filter the list view Web Part in the page with the "Query String" in the URL.



In the home page, I have a few links in the Summary Links sections. Now, I can provide the links with the query string, so that when the user clicks the link, it will directly open the page, shown above with the respective query string to show the Task Status accordingly.







This approach can be used to display the products in the list view with the query string filter having the category value.

X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now