Query Template

A template CAML uses for filtering. If you would like to specify a URL parameter that is used within the CAML template, specify the parameter name with [% … %] characters around it. To specify a default value, separate the parameter name and the default value with a pipe character. To use a different CAML filter, specify the value CWBlankFilter and fill in the Default Query property with the CAML to be used.

 

Some type of WHERE clause must be specified in this property. If no filter is desired, you can use ID >= 0, which will always be true. The XML for this is:

<Where><Geq><FieldRef Name="ID"/><Value Type="Number">0</Value></Geq></Where>

Example 1:  

<Where><Eq><FieldRef Name="Title"/><Value Type="Text">[%SearchText|Task%]</Value></Eq></Where>

Example 2:  

<Where><Eq>

<FieldRef Name="Title"/><Value Type="Text">[%SearchText|CWBlankFilter%]</Value></Eq></Where>

 

If you would like to specify a Cookie Name that is used within the CAML template, specify the parameter name with [:…:] characters around it. To specify a default value, separate the parameter name and the default value with a pipe character. To use a different CAML filter, specify the value CWBlankFilter and fill in the property Default Query with the CAML to be used.

Example 1:  

<Where><Eq><FieldRef Name="Company"/><Value Type="Text">[:Company|CorasWorks:]</Value></Eq></Where>

Example 2:  

<Where><Eq>

<FieldRef Name="Title"/><Value Type="Company">[:Company |CWBlankFilter:]</Value></Eq></Where>