0

I have the following CAML filter:

CAMLQuery: "<Query><Where><Contains><FieldRef Name='Title'/><Value Type='Text'>WD</Value></Contains></Where></Query>",

This returns everything that has WD in the Title. However when I add an AND:

CAMLQuery: "<Query><Where><AND><Contains><FieldRef Name='Title'/><Value Type='Text'>WD</Value></Contains><Contains><FieldRef Name='Status'/><Value Type='Choice'>Active</Value></Contains></AND></Where></Query>",

Returns nothing. I know there are titles that contain WD and are Active.

Thanks!

0

First, I suggest using the CAMLQuery only with your status columns for make sure if this is returning something.

Second, you might use the <Eq> tag instad of <Contains> tag

And finally, when you are sure you have data when querying the status column. Put togheter the Title and the Status queries with the <And> tag

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.