SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to dynamically construct a couple of URLs for our SharePoint users to filter down a rather large list view we have. Rather than create a bunch of different custom views, I was wondering if there is a way to just pass some URL arguments to the AllItems.aspx page and have the filter be applied during page load.

I envision maybe create a text box where they can type a question like "DocumentID" and give it a value of "12345" - then have javascript construct an appropriate URL like:

share|improve this question
up vote 8 down vote accepted

If you filter manually, you'll see that the URL changes, e.g. to something like


So if you pass the parameters FilterField1 and FilterValue1 accordingly, it should work.

share|improve this answer
This worked like a charm - exactly what I was looking for. Thanks! – Goyuix Jun 25 '10 at 15:04
it's don't work when you have to filter multiples lists – user9181 Jun 29 '12 at 1:03

I wouldn't recommend customizing a regular SharePoint view page in this way. You could create another page though outside of the list or library and put a dataview on there that uses the URL input property.

share|improve this answer

To use the query string parameters as filters you can use the Query String Filter Web Part and connect to a List View Web Part on a Web Part page.

share|improve this answer
Keep in mind that the Filter Web Parts require an Enterprise license. – Mike Oryszak Jun 25 '10 at 0:49
Query String Filter Web Part definitely the way to go (if available to you). – matt Sep 3 '15 at 18:52

Heres a post i wrote to demonstrate how we can filter a SharePoint list view web part with JavaScript.

Uses the same concept as suggested by Modery

Hope this is useful..:)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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