Data Types and Operators
This section describes the valid data types and operators used in the expression body of the expression recordset. An operator is applied to the child element(s) of the CLAUSE element. The following structure:
<CLAUSE OPER>
<PROPERTY />
<IMMED-VAL></IMMED-VAL>
</CLAUSE>
represents an operation of the form:
Operator
Argument1
Argument2
which is easier to interpret as:
Argument1 Operator Argument2
For example:
<CLAUSE OPER="equal" >
<PROPERTY ID="user.hair.color" TYPE="string" />
<IMMED-VAL TYPE="string">"brown"</IMMED-VAL>
</CLAUSE>
results in the evaluation of the expression:
"user.hair.color" = "brown" ?
Data types are specified in the PROPERTY and IMMED-VAL elements, which are child elements of the CLAUSE element. The expression architecture supports the following data types: bool, currency, date, datetime, number, siteterm, string, and time. A generic data type (not recognized as from the previous list) may be used, but with a limited set of operators. For CLAUSE elements with two arguments, the data types must match.
The valid operators for each data type are specified in the following tables. The MV column specifies which arguments, if any, can be multi-valued. All operators must be specified in lowercase.
Bool
Operator | MV | Description |
equal | None | Returns true if arg1 = arg2 |
not-equal | None | Returns true if arg1 != arg2 |
Currency, Number
Operator | MV | Description |
equal | None | Returns true if arg1 = arg2 |
not-equal | None | Returns true if arg1 != arg2 |
greater-than | None | Returns true if arg1 > arg2 |
less-than | None | Returns true if arg1 < arg2 |
at-least | None | Returns true if arg1 >= arg2 |
at-most | None | Returns true if arg1 <= arg2 |
in | Arg2 | Returns true if arg1 appears anywhere in the list in arg2 |
not-in | Arg2 | Returns true if arg1 appears nowhere in the list in arg2 |
contains | Arg1 | Returns true if arg2 appears anywhere in the list in arg1 |
not-contains | Arg1 | Returns true if arg2 appears nowhere in the list in arg1 |
intersects | Both | Returns true if the intersection of the lists arg1 and arg2 is not the empty set |
not-intersects | Both | Returns true if the intersection of the lists arg1 and arg2 is the empty set |
Date, Time, Datetime
Operator | MV | Description |
equal | None | Returns true if arg1 = arg2 |
not-equal | None | Returns true if arg1 != arg2 |
before | None | Returns true if arg1 is before arg2 |
after | None | Returns true if arg1 is after arg2 |
on-or-before | None | Returns true if arg1 is the same as or before arg2 |
on-or-after | None | Returns true if arg1 is the same as or after arg2 |
in | Arg2 | Returns true if arg1 appears anywhere in the list in arg2 |
not-in | Arg2 | Returns true if arg1 appears nowhere in the list in arg2 |
contains | Arg1 | Returns true if arg2 appears anywhere in the list in arg1 |
not-contains | Arg1 | Returns true if arg2 appears nowhere in the list in arg1 |
intersects | Both | Returns true if the intersection of the lists arg1 and arg2 is not the empty set |
not-intersects | Both | Returns true if the intersection of the lists arg1 and arg2 is the empty set |
Expression
An expression is not a data type of the PROPERTY and IMMED-VAL elements. An expression is an integer value that is evaluated as part of the EXPR-REF element. It is included in the following table for completeness in describing the available operators.
Operator | MV | Description |
is-true | None | Returns true if specified expression is true |
is-false | None | Returns true if specified expression is false |
Generic
If a profile PROPERTY element is specified as the only argument (child element) of a CLAUSE element, any generic data type can be used with the operators listed in the following table.
Operator | MV | Description |
is-defined | None | Returns true if the property is defined. Returns false if this argument is missing. |
not-defined | None | Returns true if the property is not defined or if this argument is missing. |
Siteterm
Operator | MV | Description |
equal | None | Returns true if arg1 = arg2 |
not-equal | None | Returns true if arg1 != arg2 |
in | Arg2 | Returns true if arg1 appears anywhere in the list in arg2 |
not-in | Arg2 | Returns true if arg1 appears nowhere in the list in arg2 |
contains | Arg1 | Returns true if arg2 appears anywhere in the list in arg1 |
not-contains | Arg1 | Returns true if arg2 appears nowhere in the list in arg1 |
intersects | Both | Returns true if the intersection of the lists arg1 and arg2 is not the empty set |
not-intersects | Both | Returns true if the intersection of the lists arg1 and arg2 is the empty set |
String
Operator | MV | Description |
equal | None | Returns true if arg1 = arg2. |
not-equal | None | Returns true if arg1 != arg2. |
contains | None | Returns true if arg2 appears anywhere in arg1. (For example, "Donnie" contains "nn".) |
not-contains | None | Returns true if arg2 does not appear anywhere in arg1. (For example, "flintstone" does not contain "stones".) |
begins-with | None | Returns true if the first part of arg2 matches arg1. |
not-begins-with | None | Returns true if the first part of arg2 does not match arg1. |
in | Arg2 | Returns true if arg1 appears anywhere in the list in arg2. |
not-in | Arg2 | Returns true if arg1 appears nowhere in the list in arg2. |
contains | Arg1 | Returns true if arg2 appears anywhere in the list in arg1. |
not-contains | Arg1 | Returns true if arg2 appears nowhere in the list in arg1. |
intersects | Both | Returns true if the intersection of the lists arg1 and arg2 is not the empty set. |
not-intersects | Both | Returns true if the intersection of the lists arg1 and arg2 is the empty set. |
Copyright © 2005 Microsoft Corporation.
All rights reserved.