Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

CAML Query

  Asked By: Katie    Date: May 28    Category: Sharepoint    Views: 1919

I am facing problem in writing CAML query.
I have to retrive documents from a document library order by modified
date.
For that i am using the following query:--
<Query>
<OrderBy>
<FieldRef Name="Last_x0020_Modified" Ascending="False" />
</OrderBy>
</Query>
But problem come when there is a folder in document library then i am
not able to find out document in that folder.
Do any one know solution?
What should i do or modify in query to get all document.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Kyla Eckert     Answered On: May 28

By your description, I think you are trying to do a
recursive query. This can be accomplished by setting
the Scope="Recursive" attribute of the ViewAttributes
element.

So <ViewAttributes Scope="Recursive"/>.

That should do it.

 
Answer #2    Answered By: Damon Garner     Answered On: May 28

I am executing this query  on list. But i am not getting latest docs.It
is sorting by name. Can some one help me out?
<Query>
<OrderBy>
<FieldRef Name="Last_x0020_Modified" Ascending="False" />
</OrderBy>
</Query>

 
Didn't find what you were looking for? Find more on CAML Query Or get search suggestion and latest updates.




Tagged: