Business Condition: Attribute Value Comparison

The 'Attribute Value Comparison' operation allows users to compare an attribute value on a selected object in relation to whatever the business condition is testing, be it a constant value or another attribute value on the same object. Alphanumeric comparison is used in most cases, except for dates (date, 'ISO Date', and 'ISO Date and Time') and numbers.

For example, consider an attribute named ‘Active’ on products which has value ‘Yes’ and ‘No.' If the value is ‘Yes,’ then they are active products, and they should be approved. If value is ‘No,’ then consider the objects as non-active products and do not approve them.

Another example would be classifying products based on the product attribute ‘Color.' If the value of the ‘Color’ attribute is ‘Red,’ then classify the products into ‘Red’ classifications. However, if the value of the ‘Color’ attribute is ‘Blue,’ then classify the products into ‘Blue’ classification.

Special Comparisons

  • Numeric comparison is used when both values are number based (fractions, integers, or numbers).
  • When numerical values are compared with units, the system attempts to convert the values to base units.
  • Multivalued attributes and attributes of the validation base type Embedded Number are not supported.

Prerequisites

Before using this business condition:

  1. Create a business rule as defined in the Creating a Business Rule, Function, or Library topic.
  2. Edit the business rule to configure the operation as defined in Editing a Business Rule or Function topic.

Configuration

  1. On the Edit Operation dialog, select Attribute Value Comparison from the dropdown.
  2. Click the ellipsis button () next to the first parameter to display the Attribute 1 dialog. Use Browse or Search and select the attribute to compared. Click the Select button to close the Attribute 1 dialog.
  1. In the dropdown parameter, select the condition / operator to be used to compare attributes value. Values can be equal to, greater than, less than, or any of the combinations.
  2. Select the type of compare to be performed and the value:
  • Click the constant button () to compare the attribute value with a constant value. Enter a constant value in the text box. 'Ruby' is shown in the image above.
  • Click the attribute button () to compare the attribute value with a different attribute value. Click the ellipsis button () next to the text box to display the Attribute 2 dialog. Use Browse or Search and select the attribute to be compared against. Click the Select button to close the Attribute 2 dialog.
  1. Click the Save button to add the operation to the business rule editor.