Hi All When I use CAML to filter my ListView, it ok when I use this CAML:
query = "<Where><Or>" +
"<And>" +
" <Eq>" +
"<FieldRef Name=\"TagForDiscussion\"></FieldRef>" +
"<Value Type=\"Text\">Tag</Value>" +
"</Eq>" +
"<IsNotNull>" +
"<FieldRef Name=\"TagForDiscussion\"></FieldRef>" +
"</IsNotNull>" +
"</And>" +
"<And>" +
" <Eq>" +
"<FieldRef Name=\"TagForDiscussion\"></FieldRef>" +
"<Value Type=\"Text\">Word</Value>" +
"</Eq>" +
"<IsNotNull>" +
"<FieldRef Name=\"TagForDiscussion\"></FieldRef>" +
"</IsNotNull>" +
"</And>" +
"</Or>" +
"</Where>";
It can work correctly.
But when i use the CAML in below, it will show Error in the ListView
query = "<Where><Or>" +
"<And>" +
" <Eq>" +
"<FieldRef Name=\"TagForDiscussion\"></FieldRef>" +
"<Value Type=\"Text\">Tag</Value>" +
"</Eq>" +
"<IsNotNull>" +
"<FieldRef Name=\"TagForDiscussion\"></FieldRef>" +
"</IsNotNull>" +
"</And>" +
"<And>" +
" <Eq>" +
"<FieldRef Name=\"TagForDiscussion\"></FieldRef>" +
"<Value Type=\"Text\">Word</Value>" +
"</Eq>" +
"<IsNotNull>" +
"<FieldRef Name=\"TagForDiscussion\"></FieldRef>" +
"</IsNotNull>" +
"</And>" +
"<And>" +
" <Eq>" +
"<FieldRef Name=\"TagForDiscussion\"></FieldRef>" +
"<Value Type=\"Text\">Word Test</Value>" +
"</Eq>" +
"<IsNotNull>" +
"<FieldRef Name=\"TagForDiscussion\"></FieldRef>" +
"</IsNotNull>" +
"</And>" +
"</Or>" +
"</Where>";
I just add a filter on the second CAML, why it can't work?
Anybody can help?
Thanks kedk