Caml Query:如何添加其他参数?

时间:2013-04-18 15:42:09

标签: caml

我有一个有效的查询,我想在查询中添加其他参数,例如:

<Or>
<Eq><FieldRef Name="Service_x0020_Line" /><Value Type="Choice">RPCS</Value></Eq>
<Eq><FieldRef Name="Service_x0020_Line" /><Value Type="Choice">PLM</Value></Eq>
</Or>

我怎么能在这里添加它?:

<And>
<Or>
<Or>
    <Eq><FieldRef Name='BM_x0020_Status' /><Value Type='Choice'>Completed</Value></Eq>
    <Eq><FieldRef Name='BM_x0020_Status' /><Value Type='Choice'>Not yet submitted</Value></Eq>
</Or>
    <Eq><FieldRef Name='BM_x0020_Status' /><Value Type='Choice'>For Approval</Value</Eq>
    </Or>
    <Eq><FieldRef Name='Approval_x0020_Month' /><Value Type='Text'>"+approvalmonth+"</Value></Eq>
    </And>

1 个答案:

答案 0 :(得分:0)

<And>
  <And>
    <Or>
      <Or>
        <Eq><FieldRef Name='BM_x0020_Status' /><Value Type='Choice'>Completed</Value></Eq>
        <Eq><FieldRef Name='BM_x0020_Status' /><Value Type='Choice'>Not yet submitted</Value></Eq>
      </Or>
      <Eq><FieldRef Name='BM_x0020_Status' /><Value Type='Choice'>For Approval</Value</Eq>
    </Or>
    <Or>
      <Eq><FieldRef Name="Service_x0020_Line" /><Value Type="Choice">RPCS</Value></Eq>
      <Eq><FieldRef Name="Service_x0020_Line" /><Value Type="Choice">PLM</Value></Eq>
    </Or>
  </And>
  <Eq><FieldRef Name='Approval_x0020_Month' /><Value Type='Text'>"+approvalmonth+"</Value></Eq>
</And>