2013-06-28 31 views
0

我在SharePoint 2010可視化Web部件中使用CAML生成器。但它不適用於和/或的組合。例如:不適用於SharePoint 2010中的和/或組合的CAML查詢生成器

例如:我需要根據Status = published或(Status = Draft and createdBy =當前登錄的用戶)和AppName = SharePoint從列表中獲取記錄。

CAML查詢不適用於上述情況。但是對於上面的部分聲明(下文)正在起作用。

狀態=發表或(狀態=草案和createdBy =當前登錄的用戶)

請讓我們知道這會爲和/或CAML查詢工作相結合的解決方案。

在此先感謝, 克里希納饒馬圖裏。

+0

作爲一個旁註,這個庫在構建CAML查詢時幫助了我:http://camlex.codeplex.com/ – Niklas

回答

0

工作!!!

您只能使用2度的條件下,使用更多的,你需要使用的組合條件,例如:

<And> 
     Condition A 
     <or> 
      Condition B 
      Condition C 
     <or> 
    </And> 

這等於這樣的:(ConditionA & &(ConditionB || ConditionC))