Supported operators and rules

This topic describes different types of operators in the Rules console and the rules supported.

Supported operators

Following table lists different types of supported operators in the Rules console.
Operator Type
Begins with String operator
Contains String operator
Ends with String operator
Equals Relational operator
Empty Generic for multiple operators
Does not begin with String operator
Does not contain String operator
Does not end with String operator
Does not equal Relational operator
Is not empty Generic for multiple operators
In Membership operator
Not in Membership operator
Length less than String operator
Length greater than String operator
Matches String operator
Does not match String operator
Begins with match case String operator
Ends with match case String operator
Contains match case String operator
Greater than Relational operator
Greater than or equal to Relational operator
Less than Relational operator
Less than or equal to Relational operator
Is one of Identity operator
Is not one of Identity operator
Does not begin with match case String operator
Does not end with match case String operator
Does not contain with match case String operator
Equals match case String operator
Not equals with match case String operator
Is not greater than Relational operator
Is not greater than or equal to Relational operator
Is not less than Relational operator
Is not less than or equal to Relational operator
Occurrence count not equal to Count operator
Occurrence count equal to Count operator
Occurrence count greater than Count operator
Occurrence count less than Count operator

Rules and supported operators mapping

Following table lists the rules for each supported operator in the Rules console.
Operator Rule condition If satisfied...
Begins with Check whether the String36 attribute of the spec begins with or starts with the word Item. Rule sets the value of the number enumeration attribute of the spec to 23.
Contains Checks whether the value specified for trade is present in the String36 attribute of the spec. Rule sets the value of the number attribute of the spec to 100.
Does not begin with Checks if the id attributes (primary key) of the spec does not start with the word Cat. Rule sets the value of the flag attribute of the spec to False.
Does not contain Checks whether the value specified for ed is not present in the String36 attribute of the spec. Rule sets the value of the flag attribute of the spec to True.
Does not end with Checks whether the String36 attribute of the spec does not end with ed. Rule sets the value of the integer attribute of the spec to 1000.
Does not equal explanation Checks whether the currency attribute of the spec does not equal 500. Rule sets the value of the time zone attribute of the spec to (GMT-09:00) Alaska.

The rule does not run in case the If condition is not satisfied.

Empty Checks whether there is any value in the currency attribute of the spec. Rule sets the value of the date attribute of the spec to 9/11/22 1:42 PM.
Ends with Checks whether the value of the String36 attribute of the spec, ends with or finishes with the word tion. Rule sets the value of the integer attribute of the spec is set to 5500.
Equals Checks whether the value in the integer attribute of spec name equals value 50. Rule sets the value of the value System_Unit_Conversions»m»m in the Lookup table attribute of the spec.
Greater than Checks whether the value in the integer attribute of the spec is greater than value 50. Rule sets the value of the Rules Catalog»Itm33»Itm33 in the Relationship attribute of the spec.
Greater than or equal to Checks whether the value in the currency attribute of the spec is greater than or equal to value 500. Rule sets the value true in flag attribute of the spec.
IN Checks the given If condition in any or all the multi-occurrences depending on the scope and applies the then part. The operator has following scopes:
  • Any
  • All
 
Any - If the condition is satisfied in any of the attributes.

Example

Apply a rule on the color attribute (multi-occurrence type attribute). If Any of the values of this attribute have value blue or black then the Rule sets the value of the flag iscolour to true.

 
All - If the condition is satisfied in all the attributes.

Example

Apply a rule on the color attribute (multi-occurrence type attribute). Only when All of the values of this attribute have value blue or black, the Rule sets the value of the flag iscolour to true.

 
Is not empty Checks whether the currency attribute of the spec contains any value. Rule sets the value of the URL attribute to www.google.com.
Length greater than Checks whether the length of the value in the String36 attribute of the spec is greater than 5. Rule sets the value of the currency attribute of the spec to 600.
Length less than Checks whether the length of the value in the String36 attribute of the spec is less than 4. Rule sets the value of the number attribute of the spec to 2123.
Less than Checks whether the value in currency attribute of spec name is less than value 500. If the rule runs successfully, it maps the Item to the category C11.
Less than or equal to Checks whether the value in currency attribute of spec name is less than or equal to value 500. Rule sets the value System_Unit_Conversions»US gallon»US gallon in the Lookup table attribute of the spec.
Occurrence count equal to Checks whether the multi-occurrence attribute of the spec has number of occurrences equal to 4. Rule sets the value of the number attribute of the spec to 2123.
Occurrence count greater than explanation Checks whether the multi-occurrence attribute of the spec has number of occurrences greater than 4. Rule sets the value of the number attribute of the spec to 2123.
Occurrence count Less than Checks whether the multi-occurrence attribute of the spec has number of occurrences less than 4. Rule sets the value of the number attribute of the spec to 2123.
Occurrence count not equal to Checks whether the multi-occurrence attribute of the spec has number of occurrences greater than or less than 4 but not equal to 4. Rule sets the value of the number attribute of the spec to 2123.