title: AND OR AND CAML query in SharePoint
body: <p>Can't figure out a good way to do this. I have a view in SharePoint that I want to filter using a query like (A and B) or (A and C). I'm trying to write this in CAML in Sharepoint Designer but am getting nowhere. This is my first time using CAML so that's not helping. Here's what I've come up with so far:</p>
  
  <pre><code>&lt;Where&gt;
             &lt;And&gt;
                  &lt;Or&gt;
                       &lt;And&gt;
                            &lt;Eq&gt;
                                 &lt;FieldRef Name="Component" /&gt;
                                 &lt;Value Type="Text"&gt;ComponentX&lt;/Value&gt;
                            &lt;/Eq&gt;
                            &lt;Eq&gt;
                                 &lt;FieldRef Name="Review_x0020_Canceled" /&gt;
                                 &lt;Value Type="Boolean"&gt;0&lt;/Value&gt;
                            &lt;/Eq&gt;
                       &lt;/And&gt;
                  &lt;/Or&gt;
                  &lt;Eq&gt;
                       &lt;FieldRef Name="Component" /&gt;
                       &lt;Value Type="Text"&gt;ComponentX&lt;/Value&gt;
                  &lt;/Eq&gt;
                  &lt;IsNull&gt;
                       &lt;FieldRef Name="Actual_x0020_Finish_x0020_Date" /&gt;
                  &lt;/IsNull&gt;
             &lt;/And&gt;
        &lt;/Where&gt;
  </code></pre>
  
  <p>I'd like this to display all records where (Component=ComponentX AND Review Canceled=No) or (Component=ComponentX AND Actual Finish Date=Null)</p>
  
  <p>Any ideas?</p>