Override Scenario

A calculated attribute can be used to display information about a product override on the originating product. In the screenshot below, the product 'Diamond Cut End Mills (Table Guide) Series J' has been overridden several times. The sections below describe how to use calculated attributes to display on the originating product the name of the overriding products, display on the overriding product the name of the overridden product, and display on the overriding product the IDs of parent products.

Prerequisites

For more information on product overrides, refer to the Product Overrides topic in the Getting Started documentation here.

Get Overridden By Products

A calculated attribute on the originating product can list the names of the products that are overriding it. In this example, 'Diamond Cut End Mills (Table Guide) Series J' has multiple overrides.

Value Template

The formula for this calculated attribute could be written:

{x := listlen(overriddenby()),
z := list(iterate(overriddenby(), 'stepname()'), '\n')
}
concatenate("This product is overridden by ", x, " product override(s): \n", z)

This formula uses the following elements:

  • Adding a new line using the Enter key or adding \n" allows the results to be displayed on individual lines.
  • The LISTLEN() function gets the number of override items.
  • The LISTLEN() function, used with STEPNAME(), gets the names of the override items.
  • The final output is assembled using a text string, the list count, and the STEPNAME of the overrides with new lines for each name.

Results

Get Overridden Product Objects

Select a product override object to display the Overridden Product attribute where the value is the name and ID of the product being overridden. In this example, 'Table Guide 2' has overridden the product 'Diamond Cut End Mills (Table Guide) Series J' with ID 'DCEM-100.'

Value Template

A calculated attribute on the product override could be written with the following formula:

{x := iterate(overriddenproductobject(), 'stepname()')
}
concatenate('This PO overrides the product "', x, '"')

This formula uses the following elements:

  • The ITERATE() function gets information from an object other than the currently selected object.
  • Since the maximum list length is 1, the list is displayed directly.
  • The final output is assembled using a text string and the name of the product that is overridden.

Results

Get Product Override Parents

A product that is used in one or more product overrides can have multiple parents.

Value Template

A simple metadata calculated attribute on the main product can display the IDs of the parents for all product override objects. This could be written with the following formula:

list(iterate(productoverrideparents(), "stepid()"), "/ ")

Results