Retrieving Items from a SharePoint List with subfolders using CAML Filtering


When you run a CAML query to retrieve items from a SharePoint list, make sure that your CAML query tag does not include the <Query></Query> tags.  When you include this tag, the filters are disregarded and you will retrieve the entire list
e.g.
A caml query like this
<Query>
<Where>
<Eq>
<FieldRef Name=’Title’>
<Value Type=’Text>Title.xml</Value>
</Query>
Will not retrieve the list item.
Remove the <Query></Query> tags and you should be able to retrieve the results according to the filter specified.
Here is a sample

 image

%d bloggers like this: