5
Reply

Q. What is query.ViewAttributes OR How can you force SPQuery to return results from all the folders of the list?

Sagar Pardeshi

Sagar Pardeshi

Nov 27, 2014
2.3k
0

    Hello. you need to specify the scope under ViewAttributes of query. ex query.ViewAttributes="Scope=\"Recursive\"";

    Ashish Mate
    August 26, 2015
    1

    query.ViewAttributes="Scope=\"RecursiveAll\"

    Venkatareddy Annapareddy
    January 22, 2018
    0

    ViewAttributes is used to define scope to return items.if query.ViewAttributes="Scope=\"Recursive\" then it will return all items within folder and subfolder excluding folder, it will exclude folder but can retrieve items from that folderif query.ViewAttributes="Scope=\"RecursiveAll\" then it will return all items within folder and subfolder including folders

    Suchitra Behera
    December 08, 2015
    0

    spquery.viewatributes="scope="/recursive/""

    sudi kumari
    September 01, 2015
    0

    If you use SPQuery on any SPlist .. it will bring back results from the current folder only. If you want to get results from all the folders in the list.. then you need to specify the scope of the query by the use of ViewAttributes.. e.g. query.ViewAttributes = "Scope=\"Recursive\"";

    Sagar Pardeshi
    November 27, 2014
    0