Previous  Next          Contents  Index  Navigation  Glossary  Library

Constraint Clauses

Constraints are made up of one or more clauses. Constraint clauses reference and evaluate attributes for configuration options.

Constraints are of the general syntax:

Function(Object,Attribute) Operator Function(Object,Attribute)

You can define the precedence of evaluation using up to five levels of open and closed parentheses around constraint clauses.

Functions

The following functions are used in constraint clauses to evaluate attributes of the configuration:

COUNT Counts the number of times the attribute occurs within the configuration.
MIN Returns the minimum value for items with the attribute.
MAX Returns the maximum value for items with the attribute.
QTYSUM Sums the quantity per parent model of items with the attribute.
SUM Sums the total order quantity of items with the attribute.
VALUE Returns a specific value for the item with the attribute.
ATTRIBUTE VALUE LIST Returns a list of values for a single selected object attribute.
LITERAL LIST Returns the list of alphanumeric values specified.
CHARACTER Returns the specified character string.
NUMBER Returns the specified number.
USER VALIDATION Returns the user validation. See: PL/SQL Script 1 or PL/SQL Script 2

Null Attribute Action

The Null attribute action specifies how to process functions that cannot be evaluated.

Objects

Objects include:

Attributes

Attributes are assigned to objects within your product structure. When you define constraints, you reference these attributes.

You can define an unlimited number of configuration attributes. See: Overview of Configuration Attributes

You define attribute values for each object attribute. Then, when you configure products, attributes and their values are evaluated by your product constraints.

You can optionally create regions to group configuration attributes to ease maintenance of attribute values.

Operators

You can compare two functions using the following comparison operators:

> Greater than.
< Less than.
>= Greater than or equal to.
<= Less than or equal to.
= Equal to.
!= Not equal to.
IN Evaluates whether a specified value exists in the specified list.
NOT IN Evaluates whether a specified value does not exist in the specified list.
NA No comparison made. Used for autoselection and autoexclusion constraints that use a number of constraint values in the optimization expression, but do not need comparisons. Clauses built with the NA operator do not require a right side.

Complex Constraints Using And / Or

Individual constraint clauses can be combined, using the Boolean operators And and Or, to form complex constraints.

Example 1

Assume you need a constraint to ensure that the memory ordered for a laptop PC is sufficient for the most demanding software ordered. Also, add a constraint to recommend additional memory to increase performance. A valid constraint clause for these two rules may look like the following:

((amount of memory ordered) = (amount of memory required)
AND
(recommended memory) > (amount of memory required))

See Also

Defining Constraints

Clause Evaluation

During product configuration validation, the left and right side of the constraint clause are compared. This evaluation returns a clause value of either True or False. Each function of a constraint clause is evaluated for the object attribute. This results in either a number or a character, as follows:

Function Object/Attribute Type Return Value Type
COUNT All item attributes except List and Item Name Number
SUM Numeric attributes of items Number
QTYSUM Numeric attributes of items Number
MIN All item attributes except List and Item Name Number or Character
MAX All item attributes except List and Item Name Number or Character
VALUE All object/attributes except List Number or Character
USER VALIDATIONS All object/attributes except List Number or Character
LIST Attribute value lists and literal lists Set of values
NUMBER Literal numbers Number
CHARACTER Literal characters Character


         Previous  Next          Contents  Index  Navigation  Glossary  Library