Filter by QueryString Parameter

Oct 9, 2008 at 11:13 PM
I'm wondering how I could filter by a parameter in the query string.

For Example:

Column To Filter Lookup On:  ProductID
Type of Operator:  Equal To
Value to Filter Lookup On:  <ProductID> - from http://sharepointsite/products.aspx?ProductID='101'

Maybe there's a way to use a session variable or view state instead?

Thank you!


Oct 29, 2008 at 5:56 PM
I am also looking for this same functionality, would love to see it incorporated. Thanks! ;)
Oct 31, 2008 at 5:12 AM
I really dont know how would you guys get your custom element in query string for "Edit/New item" page
let say, a query string thats by default supposed to be like:
how can you possibly get a:
Just an honest question??.. becuase i dont know.. if its possible
Is it through putting some elements in the list definition or what??

Oct 31, 2008 at 7:48 PM
I personally am going to turn off the Edit/New links in the tool bar and will create my own. Unless there is a way to alter them, I don't know either.

What I am doing now is. For instance. You have two lists: Accounts and Contacts

You create an "AccountID" Lookup in the Contacts list to Accounts "ID" field.

On the Accounts Display page you have the Account data, and then you insert in SP Designer a dataview of Contacts list below it and have it filtered by the "AccountID" that is passed through query string "Accounts/DispForm.aspx?ID=1".

Under the dateview you create an "Add New Item" link that ends up looking like this "Software/NewForm.aspx?AccountID=1".

When you click the link to the NewForm I want it to display only the account in the lookup that I am filtering by the AccountID querystring I just passed in.

What I am looking to do with your control is something like in the "Value to filter LookUp On" field is put say "{AccountID}" and then have your control replace it with the querystring value. Similar to how you do username.
Nov 2, 2008 at 6:10 AM
Ookie Dokie sir!!
gosh!!.. you so much need that querystring!!!
I am done with further updating this solution, you can put this up as one of your own ideas..
but personally i feel this is not very generalized thing people be wanting and would involve lots of pre-requisites thingys to be done using designer n stuff