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
A caml query like this
<FieldRef Name=’Title’>
<Value Type=’Text>Title.xml</Value>
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


%d bloggers like this: