Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am starting a SharePoint application where I need to filter a document library dynamically when a user visits a page.

Is this possible? If yes, how? Is it possible to have an application page with a document library on it?

i.e. a user visits an application page which has a document library on it. As the user opens the page i want to filter the documents in the library based on some user contextual information (say department) where department is a column of the meta data

(another scenario, on the application page i have a dropdownlist, after the user makes a selection i want to show specific documents based on the user selection

share|improve this question

2 Answers 2

If it is simple functionality, could you use the inbuilt filter web parts:

http://office.microsoft.com/en-us/sharepoint-server-help/work-with-filter-web-parts-HA010033786.aspx#BM2

  • Current User Filter (and select Department)
  • Choice Filter (for the drop down)
share|improve this answer
    
Is there a way to do this through code? (after page loads?) –  David Apr 14 '11 at 21:59

You can use a connection from another webpart. Have one webpart where the user selects a department and then have that value linked to the library web part so it can filter the view.

share|improve this answer
    
How could I create a webpart that is abble to be linked to the library webpart? –  pepersview Mar 2 '12 at 11:45

Your Answer

 
discard

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.