R – Displaying Documents (filtered) from a library in Sharepoint

documentlistsharepoint

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.

Best Answer

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.