3

Using CAML in WSS3, I am trying to search for a folder by the folder ID field. This results in 'undefined' when searching the 'Folder' content type but works fine searching for a regular item.

Here is a snippet of my code:

<Query><Where><Eq><FieldRef Name='ID'/><Value type='Integer'>"+folderIDtoFind+"</Value></Eq></Where></Query>
...
<QueryOptions><ViewAttributes Scope='Recursive' /></QueryOptions>

Any suggestions for how I can find folders by their id's?

Zong
  • 6,160
  • 5
  • 32
  • 46
JasonD
  • 45
  • 1
  • 1
  • 5

1 Answers1

3

Try

<Query><Where><Eq><FieldRef Name='ID'/><Value type='Counter'>"+folderIDtoFind+"</Value></Eq></Where></Query> 

Also, grab a copy of A CAML builder tool...

Community
  • 1
  • 1
Nat
  • 14,175
  • 5
  • 41
  • 64