Criteria Field
Topic Last Modified: 2009-07-23
A Structured Query Language (SQL) WHERE Clause that restricts the criteria for when an event fires.
Full Name
https://schemas.microsoft.com/exchange/events/Criteria
Variant Subtype
String
VT_BSTR
OLE DB Type
DBTYPE_WSTR
Remarks
The Criteria field applies to the OnSave Method, the OnSyncSave Method, and the OnSyncDelete Method.
The Criteria field is optional. If the Criteria field is set, then the event sink will be notified if the criteria's SQL WHERE conditions are satisfied. The following conditions are supported:
AND, OR, NOT, EXISTS
Use of the CONTAINS Predicate and the LIKE Predicate in this binding property is not supported.
Use double quotation marks for property names and single quotation marks for strings to be evaluated. Custom properties must be explicitly cast to the proper type. For example:
"WHERE cast($"MyNumber"$ as 'i4')<>15"
The WHERE Clause Criteria is limited to information in the item. It is not possible to specify conditions on data outside of this item. (The "$" character escapes the double quotation marks.)
Example
WHERE "DAV:ishidden" = FALSE and "DAV:contentclass" = 'urn:content-classes:item'
WHERE "status"='active' AND "DAV:displayname" = 'mjp.eml'
WHERE "status"= 'active' AND "DAV:displayname"='mjp.eml' AND "urn:schemas:mailheader:subject" = 'Expense Report' AND "DAV:ishidden" = FALSE AND "urn:schemas:httpmail:has attachment" = TRUE