title: CAML Query checking for NULL Parameters
body: <p>I've poured through various articles but haven't found an answer to my exact scenario. I've a SharePoint 2010 list with some Query Parameters for filter purposes. My CAML Query works well for filtering except in one circumstance, I'd like a General Display All criteria in my query for when the listview is first hit (i.e. my client will actively be able to see/page/sort the data without first having to search the list).
  If I was just filtering the list fields I'd be set, but since I'm referencing Query Parameters in my CAML I'm receiving SOAP errors in SharePoint Designer.
  The SQL equivalent would be: Where (@Parameter1 is null and @Parameter2 is null and @Parameter3 is null...)</p>
  
  <p>I've tried this structure:</p>
  
  <pre><code>    &lt;Or Group="true"&gt;
         &lt;And&gt;
           &lt;And&gt;
             &lt;IsNull&gt;
             &lt;FieldRef Name ="Title"/&gt;
             &lt;Value Type="Text"&gt;{RollNum}&lt;/Value&gt;
             &lt;/IsNull&gt;
          &lt;Gt&gt;
            &lt;FieldRef Name="ID"/&gt;                     
            &lt;Value Type="Counter"&gt;
           &lt;IfEqual&gt;
            &lt;Expr1&gt;&lt;![CDATA[{Param1}]]&gt;&lt;/Expr1&gt;   
            &lt;Expr2/&gt;
            &lt;Then&gt;0&lt;/Then&gt;                    
            &lt;Else&gt;2147483647&lt;/Else&gt;
          &lt;/IfEqual&gt;
          &lt;/Value&gt;
        &lt;/Gt&gt;
      &lt;/And&gt;
     &lt;IsNull&gt;
        &lt;FieldRef Name ="RefNumber"/&gt;
        &lt;Value Type="Text"&gt;{RefNum}&lt;/Value&gt;
        &lt;/IsNull&gt;
      &lt;/And&gt;
  &lt;/Or&gt;...the rest of the query, which works fine.
  </code></pre>
  
  <p>I have a feeling my structure is incorrect.</p>
  
  <p>Thanks in advance,
  Brian H.</p>