Share via


SimpleCriteriaType

Applies To: Operations Manager 2007 R2

The SimpleCriteriaType complex data type is used to define an expression that compares two values of the same type.

The SimpleCriteriaType data type is generally used from within the ExpressionType schema data type.

Schema Definition

<xsd:complexType name="SimpleCriteriaType">
  <xsd:sequence>
    <xsd:element name="ValueExpression" type="ValueExpressionType"/>
    <xsd:element name="Operator">
      <xsd:complexType>
        <xsd:simpleContent>
          <xsd:extension base="CriteriaCompareType">
            <xsd:attribute name="CaseSensitive" type="xsd:boolean" use="optional" default="false"/>
          </xsd:extension>
        </xsd:simpleContent>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name="ValueExpression" type="ValueExpressionType"/>
  </xsd:sequence>
</xsd:complexType>

Remarks

The SimpleCriteriaType data type evaluates two values by using a simple comparison (equal, not equal, less than, greater than, less than or equal, greater than or equal). The two values can be cast to the appropriate type for comparison.

The SimpleCriteriaType data type contains the parameters described in the following table.

Parameter Type Description

ValueExpression

ValueExpressionType

Required parameter. The value that represents the left side of the operand.

Operator

CriteriaCompareType

Required parameter. Defines the operation to perform to compare the left and right values.

ValueExpression

ValueExpressionType

Required parameter. The value that represents the right side of the operand.

The following sample XML uses the “Equal” operator to compare two values. The left value is a constant string. The right value is an XPath query into the incoming data item. The $Data reference is not required because implementation of the XPathQuery element implies it.

<Expression>
  <SimpleExpression>
    <ValueExpression>
      <Value>EventCreate</Value>
    </ValueExpression>
    <Operator>Equal</Operator>
    <ValueExpression>
      <XPathQuery>PublisherName</XPathQuery>
    </ValueExpression>
  </SimpleExpression>
</Expression>

For more samples and further explanation, see ValueExpressionType.

Information

   

Schema Type

System.ExpressionEvaluatorSchema

Library

System.Library