views:

411

answers:

2

Using the latest current version of Sharepoint.

I have aded a "Foo" document library containing documents of a custom Foo document type. The document repository carries along a FooID for each document, which will correspond to a primary key in an external database's [Foo] table that we are using for other purposes. I have a Foo.aspx page where we will pass ?FooID=X in the URL. I would like to display all of the documents in Sharepoint's Foo document library, where the FooID field matches the FooID that is specified in the URL.

There is a Document webpart, and a Site Documents webpart, but they don't seem to give me the options that I want, or allow me to display documents from a document library that I created from the web interface.

Is there a webpart that will allow me to display a list of documents in my custom document library, filtered by "Where FooID = X" ? If not, what is the best way to do this?

Thanks in Advance.

A: 

If filtering is only Requirement then you can try these option. In the Query string just add these two value and you should be ready to go.

Say for AllItems.aspx you can try as

AllItem.aspx?FilterField1=FooID&FilterValue1=X

You can use as many filter values as you want.One advantage is that it works with the View Pages of the List and Document Lib and you dont need to use even a single line of custom code.

Another option is to try Filter WebPart

Refer this article for more details

Kusek
Unfortunately, these need to be listed on a sectin of our custom page, not the separate default page. I was hoping to be able to bend an existing webpart to do this. I'm afraid that this is not an option.
Corey O.
How about the Filter WebPart you can use the Query String Web Part
Kusek
Filter webparts are a part of the Enterprise edition of SharePoint.
Colin
+1  A: 

Write your own webpart, that uses CAML to retrieve the list items from your list(s) using either SPQuery or SPSiteDataQuery.

Alternatively, you could get a third party webpart to handle the filtering, have a look at Filterzen.

Colin
Okay, this might help with the problem. When I use the "Documents" webpart, and the "Site Collection Documents" webpart, I can only grab things from a pre-defined, top-level "Documents" and "Site Collection Documents" folder. What I want to do is to grab documents that would show up in the collections that you can create in the Document Center. Anyone know if that is possible with anything already in-house?
Corey O.