Setting up a Calculated Attribute

Once you have determined that a calculated attribute is the most efficient way to address your requirement, review the following points to determine the necessary settings within the calculated attribute editor.

Description or Specification

Calculated attributes, like standard attributes, can be set to description or specification.

  • Calculated description attributes can be made valid to objects based on the object type, just as any other description attribute. Thus a calculated description attribute can be made valid for an object, but as with all description attributes, the formula is not inherited. For more information, refer to the Description Attributes documentation here.
  • Calculated specification attributes allow the formula ('Function') to inherit down to subordinate products. The calculation will always be performed at each subordinate level. Thus, calculated attribute values are not inherited, only the formula is inherited. For more information, refer to the Specification Attributes documentation here.

The following information identifies considerations when implementing a calculated attribute instead of a standard attribute.

Description Flipper

For all attributes, parameters describing the attribute are set in System Setup on the Attribute tab, under the Description flipper.

  • Mandatory - Although an attribute with the parameter 'Calculated = Yes' can also have the parameter 'Mandatory = No', this is not advised. Since an actual value of a calculated attribute is not stored in the database (only the method to calculate the value), setting a calculated attribute to mandatory will prevent the attribute from being approved since it will never have a value.
  • Dimension Dependencies - A calculated attribute only enforces the selected dimension dependencies when overriding the calculated value. A calculated attribute may reference attribute values, or reference objects that are dimension dependent, so the result of a calculated attribute is not constrained by the dimension dependency set on the attribute itself, but an override to the calculated value must respect the dimension dependency. For more information about setting calculated attributes to be dimension dependent, refer to the Calculated Attribute Settings within the Users and Groups section of the System Setup documentation here.
  • Units - When a calculated attribute uses the validation base type of Embedded Number, Fraction, Integer, Number, Numeric Text, or Numeric Text (exclude tags), the Unit template field displays. This field can hold a static Unit ID and/or an expression that evaluates to a Unit ID.

Attribute Validation Flipper

For all attributes, parameters for Attribute Validation are set in System Setup on the Attribute tab, under the Attribute Validation flipper.

  • Validation Base Type -Validation base type only takes effect when the calculated value is manually overridden, even when it is selected for a calculated attribute. It is up to the formula in the calculation to control syntax of the resolved value, including any numeric min / max constraints, or the maximum length of text. A calculated value may in fact violate the validity settings, unless a calculated attribute is given the base validity of 'Integer' with minimum and maximum values, then any override to the calculated value must conform to that validity.
  • Validation Base Type of List of Values (LOV) - Calculated attributes cannot have a validation base type of List of Values (LOV). Changing this parameter on a calculated attribute is not allowed. Attempting to update an attribute with an LOV validation base type to be calculated displays an error.
  • Multi Valued - Calculated attributes cannot have the Multi Valued parameter set to Yes. Changing this parameter on a calculated attribute is not allowed. Attempting to update a multi-valued attribute to be calculated displays an error.