CAML Query Setup

An alternative to the Variable Replacement method is the use of CAML queries. When using CAML queries, it is not necessary to pre-set the filter conditions and variables in the display. Instead, the entire query is in the CAML syntax, which CorasWorks displays simply “understand.” With this method, you need a way to automatically generate the CAML query, as is the case with the Variable Replacement method.

TIP: To determine the syntax for a CAML query, you can access the Filter page in a Display Wizard, use the Filter Builder to set the appropriate conditions, and then select the Show dynamic CAML generator checkbox. Copy the resulting CAML query and paste it where it's needed.

Several sample CAML queries are provided below, using the same scenarios as are discussed for Variable Replacement. Note that in these examples, the values are not variables.

Stage = Draft

http://www.rte.com/default.aspx?CAML=<Where><Eq><FieldRef Name='Stage' /><Value Type='Choice'>Draft</Value></Eq></Where>

Stage = Draft, Status contains Review, and Assigned To = Peter Green

http://www.rte.com/default.aspx?CAML=

<Where>
<And >
<Eq><FieldRef Name='Stage' /><Value Type='Choice'>Draft</Value></Eq>
<And >
<Contains><FieldRef Name='Status' /><Value Type='Choice'>Review</Value></Contains>

<Eq><FieldRef Name='Assigned To' /><Value Type='User'>Peter Green</Value></Eq>
</And >
</And >
</Where>

NOTE:  The lines are separated here for readability. However, the query should not have any spaces or line breaks.