Restriction

The Restriction element represents the restriction or query that is used to filter items or folders in FindItem/FindFolder and search folder operations.

<Restriction>
   <SearchExpression/>
</Restriction>

RestrictionType

Attributes and elements

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child elements

Element Description
And
Represents a search expression that enables you to perform a Boolean AND operation between two or more search expressions.
Contains
Represents a search expression that determines whether a given property contains the supplied constant string value.
Excludes
Performs a bitwise mask of the properties.
Exists
Represents a search expression that returns true if the supplied property exists on an item.
IsEqualTo
Represents a search expression that compares a property with either a constant value or another property and evaluates to true if they are equal.
IsGreaterThan
Represents a search expression that compares a property with either a constant value or another property and returns true if the first property is greater than the value or property.
IsGreaterThanOrEqualTo
Represents a search expression that compares a property with either a constant value or another property and returns true if the first property is greater than or equal to the value or property.
IsLessThan
Represents a search expression that compares a property with either a constant value or another property and returns true if the first property is less than the value or property.
IsLessThanOrEqualTo
Represents a search expression that compares a property with either a constant value or another property and returns true if the first property is less than or equal to the value or property.
IsNotEqualTo
Represents a search expression that compares a property with either a constant value or another property and returns true if the values are not the same.
Not
Represents a search expression that negates the Boolean value of the search expression it contains.
Or
Represents a search expression that performs a logical OR operation on the search expression it contains. The Or element will return true if any of its children return true.
SearchExpression
Represents the substituted element within a restriction. This element is not used in an XML instance document.

Parent elements

Element Description
FindFolder
Defines a request to identify folders in a mailbox.
FindItem
Defines a request to find items in a mailbox.
SearchParameters
Represents the parameters that define a search folder.

Remarks

The schema that describes this element is located in the EWS virtual directory of the computer that is running Microsoft Exchange Server 2007 that has the Client Access server role installed.

Element information

Element Example
Namespace
http://schemas.microsoft.com/exchange/services/2006/messages
Schema name
Messages schema
Validation file
messages.xsd
Can be Empty
False

See also