Criteria Field

Criteria Field

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

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

[Visual Basic] String

[C++] 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

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.