當我使用CAML過濾我的ListView,就OK了,當我用這個CAML:當我使用CAML過濾的ListView <! - 失敗#RENDER - >是顯示在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>" +
"</Or>" +
"</Where>";
它可以正常工作。
但是,當我在下面使用CAML,它會顯示錯誤在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>";
我只是添加過濾器在第二CAML,爲什麼它不能工作?
有人可以幫忙嗎?
感謝 kedk