CAML queries: how to filter folders from result set?

后端 未结 8 1651
遇见更好的自我
遇见更好的自我 2021-02-12 11:38

I\'m using caml query to select all documents which were modified or added by user. Query runs recursively on all subsites of specified site collection.

Now problem is I

8条回答
  •  悲哀的现实
    2021-02-12 12:13

    If you're working with folders and you're using an SPQuery object you also may want to use the ViewAttributes field to allow for recursive item retrieval. Setting the value to Scope="Recursive" will retrieve items from subfolders and will not retrieve the folder objects in the result set.

    myQuery.ViewAttributes = "Scope=\"Recursive\"";
    

提交回复
热议问题