Product Administration Guide > Configuration Rule Template Reference >
Constrain Product Quantity
The Constrain Product Quantity template has the form:
[The quantity of a product] [=] [a value]
The template has three parts. The first operand names the product.
The operator, [=], defines how the product quantity is related to the third operand, [a value]. The operator is limited to numeric comparisons ( =, <, >, and so on).
The [a value] operand can be any of the following:
- The quantity of a product in the solution
- The quantity of items from another relationship in the solution
- The quantity of items in the solution from a class within a relationship
- The value of an attribute (the data type for the attribute must be number or integer)
- A number
The "Insert a" tab provides two sets of arithmetic functions that allow you to combine these items. For example, you could write the following rule:
The quantity of Item A from Items Class <= the quantity of Products-Class items
In this rule, "the quantity of item A from Items Class" is the first operand. It names Item A in the Items class. The second operand is "<=".
The third operand is "the quantity of Products-Class items" and refers to items in the Products class. This class is contained within a relationship in the customizable product.
The rule states that the quantity of Item A in the solution must be less than or equal to the number of items from the Products-Class in the solution.
Use Constrain Product Quantity rules to set limits on the quantity of products that can be in the solution. The limits can be defined as a number or as the quantity of other items, or the value of an attribute.