Why are documents inside a folder not showing when a filter is applied?
-
I added a custom column called Project (string) to a Document List. I then set different views in different pages to filter on that column. The problem is that, when applying the filter, documents stored inside folders are not shown even if the value of the Project column corresponds to the one set in the filter. Do you know how to solve this problem?
-
Answer:
Based on your last comment I create a webpart to show the Document List on a certain page, and then I applied a filter on a column content to show only certain documents. But in that way the folder structure is lost and all documents are shown flat. I think I can answer your your question now. If you create a new view and select in the filter section Content Type Equals Folder OR And then add the additional condition you wish to apply to the documents. In this way folders will always be displayed but their contents will be filtered based on the additional constraint. This will cause folders to be displayed whether or not they contain any children matching the additional constraint but you will be able to navigate the hierarchy.
Drake at SharePoint Visit the source
Other answers
If you created the view in code you will need to specify the Scope="Recursive" ViewAttribute Some examples are given here http://sharepointmagazine.net/technical/development/writing-caml-queries-for-retrieving-list-items-from-a-sharepoint-list If you created the views with the SharePoint UI you will need to Modify the view. Expand the "Folders" section in the Edit View page Select "Show all items without folders" This will perform a recursive query.
Steve P
Specifying ViewAttributes Scope='Recursive' does not seem to work, Rather the Scope property of SPView needs to be set to Recursive: SPView view = list.Views.Add(“TestView”, fields, string.Empty, 100, true, false); view.Scope = SPViewScope.Recursive; Here is a complete example: http://sharepointnadeem.blogspot.in/2012/02/create-view-to-show-all-items-without.html
Nadeem Yousuf
Related Q & A:
- How to change folder properties inside a sharepoint library?Best solution by SharePoint
- Why cannot we use static keyword inside a method in java?Best solution by Stack Overflow
- Why can't I view the "Sent To" information after moving (organizing) a sent message to a folder I created?Best solution by Yahoo! Answers
- Why do I get a message in German when I post on freecycle?Best solution by wiki.freecycle.org
- What's inside a Mosquito bite, and why does it swell up?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.