Sharepoint:如何过滤文档库视图以显示子文件夹的内容? [英] Sharepoint: How do I filter a document library view to show the contents of a subfolder?

查看:330
本文介绍了Sharepoint:如何过滤文档库视图以显示子文件夹的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与我一起工作的一些业务领域使用文件夹结构来组织他们的SharePoint文档(不是我所知道的理想,但我们坚持下去)。

我想使用Web部件页面根据文档出现的子文件夹显示其文档库的许多视图,但是这样做比较困难比我想象的要多。有没有人曾经克服过这个问题?

解决方案

使用Sharepoint Designer,您可以编辑XSLT列表视图的CAML。如果您将View元素的Scope属性设置为递归或 RecursiveAll ,将返回所有文件和文件夹,您可以通过 FileDirRef 过滤文档:

 < Where> 
<包含>
< FieldRef Name ='FileDirRef'/>
< Value Type ='Lookup'> MyFolder< / Value>
< /包含>
< / Where>

这将返回其路径中包含字符串MyFolder的所有文档。



我在 http://platinumdogs.wordpress.com/2009/07/21/querying-document-libraries-or-pulling-teeth-with-caml/ 和有用的信息在 http://blog.thekid.me.uk/archive/2007/03/21/wss-field-display-amp-internal-names-for-lists-amp- document-libraries.aspx


A number of business areas I work with use a folder structure to organise their Sharepoint housed documents (not ideal I know, but we're stuck with it).

I would like to use a web part page to present a number of views of their document libraries based on the subfolders that the documents appear in, but this is proving more difficult than I had thought. Has anyone overcome this problem in the past?

解决方案

With Sharepoint Designer you can edit the CAML of your XSLT List View.

If you set the Scope attribute of the View element to Recursive or RecursiveAll, which returns all Files and Folders, you can filter the documents by FileDirRef:

<Where>
   <Contains>
      <FieldRef Name='FileDirRef' />
      <Value Type='Lookup'>MyFolder</Value>
   </Contains>
</Where>

This returns all documents which contain the string 'MyFolder' in their path.

I found infos about this on http://platinumdogs.wordpress.com/2009/07/21/querying-document-libraries-or-pulling-teeth-with-caml/ and useful information abouts fields at http://blog.thekid.me.uk/archive/2007/03/21/wss-field-display-amp-internal-names-for-lists-amp-document-libraries.aspx

这篇关于Sharepoint:如何过滤文档库视图以显示子文件夹的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆