Expression Body Structure

This section describes the Extensible Markup Language (XML) structure, elements, and attributes of the expression body of the expression recordset. The expression body is the evaluable part of the recordset and is generally referred to as the expression. All elements and attributes are specified in uppercase. The only exception to this rule is the <PROPERTY> element.

In the following example, capitalized names refer to the elements of the XML structure. The first occurrence of each element is linked to documentation on that element. Names in italic are attributes associated with each element. Bold italic signifies attributes that are required. Lowercase values represent data that is contained between the opening and closing element tags.

<TERMTYPE>
   <CLAUSEOPER>
      <PROPERTYID TYPE SUBTYPE />
      <IMMED-VALTYPE SUBTYPE MULTIVAL>
         <VALUE>value1</VALUE>
         <VALUE>value2</VALUE>
      </IMMED-VAL>
   </CLAUSE>
   <CLAUSE OPER>
      <EXPR-REFID />
   </CLAUSE>
   <TERM TYPE>
      <CLAUSE OPER>
         <PROPERTY ID TYPE SUBTYPE />
         <IMMED-VAL TYPE SUBTYPE MULTIVAL>immediate value</IMMED-VAL>
      </CLAUSE>
      <CLAUSE OPER>
      </CLAUSE>
   </TERM>
</TERM>

CLAUSE

CLAUSE elements are the building blocks of expressions and evaluate to either True or False. CLAUSE elements contain an operator attribute and one or two arguments listed as child elements. CLAUSE elements can be grouped together by TERM elements to create more complex expressions. A CLAUSE element along with its child elements represents one of the following operations:

  • [profile property] [operator] [immediate value]

  • [profile property] [operator] [profile property]

  • [profile property] [operator]

  • [intrinsic] [operator] [immediate value]

  • [intrinsic] [operator]

  • [expression] [operator]

Parent Elements: TERM

Child Elements: EXPR-REF, IMMED-VAL, PROPERTY

Attributes:

Name Description
OPER Required. Specifies the operator to be used to evaluate the child arguments.

See Also

TERM

EXPR-REF

IMMED-VAL

PROPERTY

EXPR-REF

Expressions can be built from other expressions, allowing larger, more complex expressions. Expressions are referred to by their unique IDs (an integer value), not their names. The only valid operators for the EXPR-REF element are "is-true" and "is-false".

Parent Elements: CLAUSE

Child Elements: None

Attributes:

Name Description
ID Required. An integer that is the ID of the expression to evaluate.

See Also

CLAUSE

IMMED-VAL

The IMMED-VAL element represents a hard-coded value used to check the preceding profile PROPERTY element against. For example, the number "25" and the string "Joe" are both immediate values. Immediate values can be either single-valued or multi-valued, and have a specific data type.

Parent Elements: CLAUSE

Child Elements: VALUE (when MULTIVAL = "True")

Data: Valid types - bool, currency, date, number, siteterm, string, time

Attributes:

Name Description
TYPE Required. Valid types are: bool, currency, date, datetime, number, siteterm, string, and time.
SUBTYPE Specifies the sub-type of the property, if appropriate. For example, when TYPE = "siteterm", the value of the SUBTYPE attribute is the appropriate path for accessing the site-term in the Site Terms store. The default is "".
MULTIVAL A bool that defaults to False. In this case, a single value is specified between the opening and closing tags. True indicates that the immediate value is multi-valued. In this case, the list of values is specified as a sequence of VALUE tags between the opening and closing tags.

See Also

CLAUSE

VALUE

PROPERTY

The PROPERTY element represents a profile property or intrinsic that is the actual data being evaluated. Profile properties can be either single-valued or multi-valued, and have a specific data type. When a profile property is specified as the only argument (child element) of a CLAUSE element, the only valid operators are "is-defined" and "not-defined". An exception to the all uppercase syntax rule, this element is specified as <Property> if an expression containing it should appear in the Campaign Expressions module in Business Desk.

Ee825123.note(en-US,CS.10).gif Note

  • When building an expression, all profile properties in the expression must be from the same data source (for example, all from SQL Server databases, or all from Active Directory).

Parent Elements: TERM

Child Elements: CODE, EXPR-REF, IMMED-VAL, PROPERTY

Attributes:

Name Description
ID Required. Specifies the profile property or intrinsic.
TYPE Required. Valid types are: bool, currency, date, datetime, number, siteterm, string, and time. A generic type is also supported for the "is-defined" and "not-defined" operators.
SUBTYPE Specifies the sub-type of the property, if appropriate. For example, when TYPE = "siteterm", the value of the SUBTYPE attribute may be "Site Terms.Products.Cars.Colors". The default is "".

See Also

TERM

EXPR-REF

IMMED-VAL

Intrinsics

TERM

The TERM element evaluates a group of CLAUSE elements according to some logic function. Currently, the expression architecture supports the following Boolean logic operations: AND, OR, and NOT. TERM elements can be further grouped together, along with additional CLAUSE elements, to form more complex expressions.

Parent Elements: TERM

Child Elements: CLAUSE, TERM

Attributes:

Name Description
TYPE Required. This attribute specifies how the containing TERM elements and CLAUSE elements are logically combined.

Valid values are: AND, OR, NOT

See Also

CLAUSE

VALUE

The VALUE element is used to specify the individual values of a multi-valued IMMED-VAL element.

Parent Elements: IMMED-VAL

Child Elements: None

Data: Valid types - bool, currency, date, datetime, number, siteterm, string, and time

Attributes: None

See Also

IMMED-VAL


All rights reserved.