CAML: Use “text“ as type when querying text fields

As I don’t write CAML queries very often due to some good libs I have worked out over time I sometimes forget little nuances about CAML. One of my favorites is using “string” instead of “text” as type when querying text fields.

Wrong:


<Where><Eq><Value Type=string>Green, Graham</Value></Eq></Where>

Right:


<Where><Eq><Value Type=text>Green, Graham</Value></Eq></Where>

Hope it helps.


Leave a Reply

Your email address will not be published. Required fields are marked *