CAML Criteria Builder

CAML Criteria Builder

Overview of Alert Plus Event Tab

When configuring the Event tab in Alert Plus, you have a choice regarding which items in the List will generate an alert for you. That choice gives you a variety of options to choose:

  • Everything in the list generates an alert
  • Items in a particular view will generate an alert
  • Some Items (Advanced) allows you full control over the set of items in the Alert List that generate alerts. In order to specify which items to alert on, you will build a CAML Query that will be used to filter the list.

The easiest way to build a CAML Query is to use the Criteria Builder Tool on the Alert Plus Event tab. This tool provides a simple user interface to construct filter criteria and save it to the CAML Query field. This filtering capability allows you to specifically target your alert on items with specific List field values. Once you get familiar with it, the CAML Query builder is fairly simple and straightforward. The Criteria Builder resides at the bottom of the page. You simply pick the criteria based on content in a field.

As an example, consider an alert sent when the Author field is equal Mark Twain:

Step Action Result
1. Choose from a drop down list of all the columns in the list; in our case, we selected Author Equals.png

Some content may not be labeled in identical ways; some may enter “Twain, Mark” or some may use “Mark Twain” so in this instance, we prefer to use the comparison “Contains” and eliminate extraneous values so that the query finds anything in the author column that contains “Twain”.
Contains.png

2. Choose the Comparison operation.
3. Type in the Value; in this example, Mark Twain.
But we want to set an alert on multiple values; for example, whenever a document contains one value or another.
4. In our example, we want to pick on the Author column again, but in this instance choose Twain or Dickens. AndOr.png
When selecting the Or option, a second level on the Criteria Builder becomes available so we can further define our selection criteria.
5. Once we have built our criteria, we use the button at the bottom of the web part to copy our criteria into the CAML Query box. Copy2.png
CAMLQuery.png
When you look closely at that string inside the CAML Query box, you can make out some of the choices we made in the criteria builder. Notice the statement is referencing the Author column, the value is Text and the words that we typed into the Value box are spelled out “Twain” “Dickens.”

The above example is a very simple way of explaining the Alert Plus Criteria Builder. Developers and power users can become very proficient in writing CAML Queries and Bamboo provides this option to give you quite a lot of control over setting alert criteria.

Also see Additional Tips for using the CAML Criteria Builder