FilterOp

Lists valid operations on a filter. For more information see Filters and Views.

Syntax

<FilterOp>
<enumeration value="and"/>
<enumeration value="or"/>
<enumeration value="not"/>
<enumeration value="eq"/>
<enumeration value="ne"/>
<enumeration value="gt"/>
<enumeration value="lt"/>
<enumeration value="gte"/>
<enumeration value="lte"/>
<enumeration value="contains"/>
<enumeration value="containsWord"/>
<enumeration value="begins"/>
<enumeration value="exists"/>
<enumeration value="notExist"/>
<enumeration value="isOf"/>
<enumeration value="isNotOf"/>
<enumeration value="fieldEqual"/>
<enumeration value="fieldGTE"/>
<enumeration value="fieldGT"/>
<enumeration value="fieldLTE"/>
<enumeration value="fieldLT"/>
<enumeration value="fieldNE"/>
<enumeration value="fieldDateEqual"/>
<enumeration value="bitCare"/>
<enumeration value="notContains"/>

Definitions

and

Specifies to gather a group of filters. In the example below, two filters are ANDed together. The following filter returns items if the subject contains “custom” and the creation date is greater than 10-06-2012:

<filter> 
<element type="FilterGroup"> 
<op>and</op> 
<element type="FilterEntry"> 
<op>contains</op> 
<field>subject</field> 
<value>custom</value> 
</element> 
<element type="FilterEntry"> 
<op>gt</op> 
<field>created</field> 
<value>2012-10-06T00:00:00Z</value> 
</element> 
</element> 
</filter>
or

Specifies to gather a group of filters. In the example below, two filters are ORed together. The following filter returns items if the subject contains “custom” or the creation date is greater than 10-06-2012:

<filter> 
<element type="FilterGroup"> 
<op>or</op> 
<element type="FilterEntry"> 
<op>contains</op> 
<field>subject</field> 
<value>custom</value> 
</element> 
<element type="FilterEntry"> 
<op>gt</op> 
<field>created</field> 
<value>2012-10-06T00:00:00Z</value> 
</element> 
</element> 
</filter>
not

Specifies how to gather a group of filters. In the example below, two filters are NOTed together. The following filter returns all items that do not match if the subject contains “custom” and the creation date is greater than 10-06-2012:

<filter> 
<element type="FilterGroup"> 
<op>or</op> 
<element type="FilterEntry"> 
<op>contains</op> 
<field>subject</field> 
<value>custom</value> 
</element> 
<element type="FilterEntry"> 
<op>gt</op> 
<field>created</field> 
<value>2012-10-06T00:00:00Z</value> 
</element> 
</element> 
</filter>
eq

Specifies to return items with equal a value. The following example returns items with a created date equal to 2012-09-15T20:25:05Z:

<filter> 
<element type="FilterEntry"> 
<op>eq</op> 
<field>created</field> 
<value>2012-09-15T20:25:05Z</value> 
</element> 
</filter>
ne

Specifies to return items not equal to the value. The following example returns items with a created date not equal to 2012-09-15T20:25:05Z:

<filter> 
<element type="FilterEntry"> 
<op>eq</op> 
<field>created</field> 
<value>2012-09-15T20:25:05Z</value> 
</element> 
</filter>
gt

Specifies that the field has a value greater than the value specified. The following example returns items with a startDate greater than 2012-10-07T00:00:00Z:

<filter> 
<element type="FilterEntry"> 
<op>gt</op> 
<field>startDate</field> 
<value>2012-10-07T00:00:00Z</value> 
</element> 
</filter>
lt

Specifies that the field has a value less than the value specified. The following example returns items with a startDate less than 2012-10-07T00:00:00Z:

<filter> 
<element type="FilterEntry"> 
<op>lt</op> 
<field>startDate</field> 
<value>2012-10-07T00:00:00Z</value> 
</element> 
</filter>
gte

Specifies that the field has a value greater than or equal to the value specified. The following example returns items with a startDate greater than or equal to 2012-10-07T00:00:00Z:

<filter> 
<element type="FilterEntry"> 
<op>gte</op> 
<field>startDate</field> 
<value>2012-10-07T00:00:00Z</value> 
</element> 
</filter>
lte

Specifies that the field has a value less than or equal to the value specified. The following example returns items with a startDate less than or equal to 2012-10-07T00:00:00Z:

<filter> 
<element type="FilterEntry"> 
<op>lt</op> 
<field>startDate</field> 
<value>2012-10-07T00:00:00Z</value> 
</element> 
</filter>
contains

Specifies that the value is contained in the field. The following example returns items with a subject that contains “Today:"

<filter> 
<element type="FilterEntry"> 
<op>contains</op> 
<field>subject</field> 
<value>Today</value> 
</element> 
</filter>
containsWord

Specifies that the value is contained in the field. The following example returns items with a subject that contains “Today:"

<filter> 
<element type="FilterEntry"> 
<op>containsWord</op> 
<field>subject</field> 
<value>Today</value> 
</element> 
</filter>
begins

Specifies that the value begins with the value in the specified field. The following example returns items with a subject that begins with “Setting:"

<filter> 
<element type="FilterEntry"> 
<op>begins</op> 
<field>subject</field> 
<value>setting</value> 
</element> 
</filter>
exists

Specifies items that have a specific element in the item.

notExist

Specifies items that do not have a specific element in the item.

isOf

If the value element can have more than one value (such as mail, task, and appointment), the isOf operation can be used for the filter operation. In the following example, items are returned if the item types are Appointment or Task:

<filter> 
<element type="FilterEntry"> 
<op>isOf</op> 
<field>@type</field> 
<value>Appointment Task</value> 
</element> 
</filter> 
isNotOf

If the value element can have more than one value (such as mail, task, and appointment), the isNotOf operation can be used for the filter operation. In the following example, items are returned if the item type is not Appointment:

<filter> 
<element type="FilterEntry"> 
<op>isNotOf</op> 
<field>@type</field> 
<value>Appointment</value>
</element> 
</filter> 
fieldEqual

Is used with the relative date element in the filter. FieldEqual indicates that the date equals the relative date. For example, the following filter returns items with a startDate 1 day less than Today:

<filter> 
<element type="FilterEntry"> 
<op>fieldEqual</op> 
<field>startDate</field> 
<value>-1</value> 
<date>Today</date> 
</element> 
</filter>
fieldGTE

Is used with the relative date element in the filter. fieldGTE indicates that the date is greater than or equal to the relative date. For example, the following filter returns items that are greater than or equal to the startDate of Today minus 1 day:

<filter>
<element type="FilterEntry"> 
<op>fieldGTE</op> 
<field>startDate</field> 
<value>-1</value> 
<date>Today</date> 
</element> 
</filter>
fieldGT

Is used with the relative date element in the filter. fieldGT indicates that the date is greater than the relative date. For example, the following filter returns items that are greater than the startDate of Today minus 1 day:

<filter>
<element type="FilterEntry"> 
<op>fieldGT</op> 
<field>startDate</field> 
<value>-1</value> 
<date>Today</date> 
</element> 
</filter>
fieldLTE

Is used with the relative date element in the filter. fieldLTE indicates that the date is less than or equal to the relative date. For example, the following filter returns items that are less or equal than the startDate of Today minus 3 days:

<filter>
<element type="FilterEntry"> 
<op>fieldLTE</op> 
<field>startDate</field> 
<value>-3</value> 
<date>Today</date> 
</element> 
</filter>
fieldLT

Is used with the relative date element in the filter. fieldLT indicates that the date is less than the relative date. For example, the following filter returns items that are less than the startDate of Today minus 5 days:

<filter>
<element type="FilterEntry"> 
<op>fieldLT</op> 
<field>startDate</field> 
<value>-5</value> 
<date>Today</date> 
</element> 
</filter>
fieldNE

Is used with the relative date element in the filter. fieldNE indicates that the date is not equal to the relative date:

<filter> 
<element type="FilterEntry"> 
<op>fieldNE</op> 
<field>startDate</field> 
<value>-4</value> 
<date>Today</date> 
</element> 
</filter>
fieldDateEqual

Is used with the relative date element in the filter (similar to fieldEqual).

bitCare

BitCare translates into an operator that means “Is Not Of” or “Does Not Include” or “Not Equal To”. In the following example, items that are not appointments are returned. The field specifies ItemType and the mask specifies “Is Not Of” type Appointment.

<filter>
<element type="FilterEntry">
<op>bitCare</op>
<field>@type</field>
<value />
<mask>Appointment</mask>
</element>
</filter>

The following example has a value of Appointment. This translates into a filter where ItemType “Equals” appointment.

<filter>
<element type="FilterEntry">
<op>bitCare</op>
<field>@type</field>
<value Appointment/>
<mask>Appointment</mask>
</element>
</filter>
notContains

Specifies that the value is not contained in the field. The following example returns items with a subject that do not contain “Today”.

<filter>
<element type="FilterEntry">
<op>notContains</op>
<field>subject</field>
<value>Today</value>
</element>
</filter>