[ACCEPTED]-Sharepoint: How do I filter a document library view to show the contents of a subfolder?-subdirectory
With Sharepoint Designer you can edit the 8 CAML of your XSLT List View.
If you set 7 the Scope attribute of the View element 6 to Recursive or RecursiveAll, which returns all Files and Folders, you 5 can filter the documents by FileDirRef:
<Where> <Contains> <FieldRef Name='FileDirRef' /> <Value Type='Lookup'>MyFolder</Value> </Contains> </Where>
This returns 4 all documents which contain the string 'MyFolder' in 3 their path.
I found infos about this on 2 http://platinumdogs.wordpress.com/2009/07/21/querying-document-libraries-or-pulling-teeth-with-caml/ and useful information abouts fields at 1 http://blog.thekid.me.uk/archive/2007/03/21/wss-field-display-amp-internal-names-for-lists-amp-document-libraries.aspx
Have you thought about creating a view with 4 'Folder = Show all items without folders', that 3 would get all your documents out of their 2 folders and then perhaps you could create 1 your filter(s) over that view.
Have a look at the content by type web part 2 - http://codeplex.com/eoffice - probably the most flexible viewing 1 web part.
What kind of document library information 10 do you want in the view? How do you want 9 the user to filter the view?
In general the 8 most powerful way of creating views in sharepoint 7 is with the data view web part. http://office.microsoft.com/en-us/sharepointdesigner/HA100948041033.aspx
You will 6 need Microsoft Office SharePoint Designer.
You 5 can present different views of you folders 4 using the data view filter and sorting controls.
You 3 can use web part connections to filter a 2 dataview. You can use any datasource linked 1 to say a drop down to filter a dataview. How to tie a dropdown list to a gridview in Sharepoint 2007?
I don't know of any out-of-the-box way to 5 achieve this. As you say, this is not how 4 SharePoint lists are intended used. It might 3 work to create a custom site column displaying 2 the path to the document, as this might 1 be used in a filter. Have never tried it, though.
Use a Page Viewer webpart and switch from 2 Web Page to Folder. You can the specify 1 the folder you want to display in the Link.
You can also get a direct link to a view 11 within a folder by using "TreeValue", "TreeField" and 10 "RootFolder".
To further explain: I 9 have a SharePoint site, with a docs library 8 called YourLibrary. I have a folder called 7 MyFolder. I created a view that can be used 6 at any level of that Library structure with 5 a URL path of YourView.aspx Using that link, it 4 will take me to the view I created, with 3 all the filters and styles, but only show 2 the results that would occur in the contents 1 of that folder in RootFolder and TreeValue.
Try this, pick or create one column and 10 make that value required so that it's always 9 populated such as title. A field that doesn't 8 hold the name of the folder. Then in your 7 filter put the filter you wanted that will 6 select only the files you want. Then add 5 an or to your filter, select your "required" field 4 then set it equal to and leave the filter 3 blank. Since all folders will have a blank 2 in this required field your folders will 1 show up with your files.
In SP2013 Online, I tried the filter conditions 4 as
This showed me all the folders containing 3 the
Name in their file path. It lists even sub-folder 2 contents which wasn't available when i tried 1
More Related questions