Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

CAML Query

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

I am facing problem in writing CAML query.
I have to retrive documents from a document library order by modified
For that i am using the following query:--
<FieldRef Name="Last_x0020_Modified" Ascending="False" />
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.



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

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?
<FieldRef Name="Last_x0020_Modified" Ascending="False" />

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