Calculated Attributes

Calculated attributes are a special type of attributes whose values are not written in the database but are calculated on the fly. Calculated values are dynamic based on the context, version, product selected in the GUI or included in the export. Calculated values are generated when clicking on the object in GUI or when exported and are not stored in the database. The foundation for a calculated attribute is a functional programming language very similar to the language used for defining functions in Excel.

Note: Change Flags for events require that data is present in the database. Since calculated attribute values are not stored, no change flags are generated. For more information, refer to the Limitations and Exceptions section of the Core Events topic in the System Setup documentation here.

For assistance in determining if a calculated attribute is the most efficient way to meet your requirements, refer to the Calculated Attribute Considerations and Limitations topic in the Calculated Attributes section of the System Setup documentation here.

The value of a calculated attribute is determined by a value template which can be written in the Function Editor. Many functions can include an argument, which specifies the STEP data to be accessed. Functions can access information from references, compare data between objects, round numbers, modify text, and many other options. For a step-by-step guide to creating a calculated attribute, refer to the Creating a Calculated Attribute topic in the Calculated Attributes section of the System Setup documentation here.

As an example, the following functions and arguments are included in the workbench image below:

  • The 'concatenate' function takes a comma-delimited list of arguments. In this example, the three (3) arguments are: prodval('Domestic Distribution ID'), '-', and prodval('International Distribution ID').
  • The 'prodval' function takes an argument of an attribute ID and retrieves the value of the attribute identified. In this example, the two (2) attribute IDs are: 'Domestic Distribution ID' and 'International Distribution ID'.
  • Assuming that the 'Domestic Distribution ID' value is 1234 and the 'International Distribution ID' value is 5678, the result of this 'Value template' would be 1234-5678.

For additional use cases for calculated attributes, refer to the Calculated Attribute Use Cases topic here.

In Web UI, calculated attributes can be identified, and their values can be overridden on the Attribute Management screen as described in the Calculated Attributes in Web UI section of the Web User Interfaces documentation here.

Several parameters affect the export of calculated attributes and their values and/or empty values in both the Export Manager and in an OIEP. For more information, refer to the following topics in the Data Exchange documentation: