SharePoint SPSiteDataQuery基于doc,pdf,xls等文档扩展名过滤数据,

时间:2012-01-06 08:33:37

标签: sharepoint sharepoint-2010 caml

有人可以告诉我如何根据文档扩展名使用SPSiteDataQuery过滤数据?我不想显示所有文档,只显示那些具有doc,docx,xl​​s,xlsx,pdf等扩展名的文档。

感谢您的帮助。

1 个答案:

答案 0 :(得分:1)

您可以在File_x0020_Type列上进行过滤:

<Where>
  <Eq>
    <FieldRef Name='File_x0020_Type' />
    <Value Type='Text'>doc</Value>
  </Eq>
</Where>