Require Template

The Require template has the form:

[item or condition] requires [item or condition]

A require constraint is a logical implies. If the first operand is true then the second operand is implied (must be true). For example, Item A requires Item B. This constraint means that if Item A is present in the solution, then Item B must be present. Another example: Condition A requires Item B. This constraint means that if Condition A is true, then Item B must be present in the solution.

A require constraint is not mutual. The constraint Item A requires Item B does not imply Item B requires Item A. However, if Item B is excluded then Item A is also excluded. This is because when Item B is excluded, the constraint can never be true.

The require operator is functionally equivalent to the following Boolean expression:

(NOT A) OR B

In the first two columns of the following table, a 1 means the item is present in the solution. A 0 means it is absent or excluded.

A B NOT A (NOT A) OR B

1

0

0

False

0

1

1

True

0

0

1

True

1

1

0

True

The table shows that a require constraint behaves as follows:

  • False when Item A is present and Item B is not. (If Item B cannot be present, Item A cannot be present).

  • True when Item B is present and Item A is not.

  • True when neither is present.

  • True when both are present.

Use require constraints to:

  • To create a requires relationship for items in different relationships. For example, you can write a constraint that if Item A in relationship 1 is picked, then Item B in relationship 2 is required.

  • To add items to the configuration if a condition is true.

  • To create relationships between other items (conditions) when a product is added to the solution.