Classification Scenario

An asset is linked to two classifications.

Get All Classifications

A metadata calculated attribute on the asset will display the name and/or ID for all classifications. The calculated attribute formula could be written as:

list(iterate(classifications(), 'stepname()'), "\n")

The new line (added by pressing Enter or using "\n") within the formula allows the attribute value to display on multiple lines, as shown in the following image.

Get Classifications Based on Type

Multiple types of classifications exist.

A calculated attribute on the product could display a limited number of classifications. For example, only include the 'WebLink' references type, which have an ID of 'WebInclude'.

The calculated attribute formula could be written as:

list(iterate(classifications("WebInclude"), "stepid()"), "/ ")

The result displays the references separated by the text string "/ ".

Get Metadata Value Located on the Link From Classification-to-Product

The product is linked to a classification folder with a product to classification reference type, and includes metadata on that particular product to classification reference type link.

For example, Classroom Type Projectors has a product to classification reference type called WebLink reference (ID = 'WebInclude'), that has the metadata attribute prod2prod2class on it.

The calculated attribute formula could be written as:

list (iterate(classificationproductlinks("WebInclude"),'value("prod2prod2class")'), '\n')

This will display the meta attribute value from all classification links with type WebInclude and the separator between the multiple links values is ā€œ\nā€ (new line).

The result displays the value of the linked metadata on the original product.

Get CPL Classifications Using Classification Product Links

A product is linked into one or more classifications and metadata from each classification is needed. For example, for the Classroom Type Projectors product, linked using SupplierLink and WebLink, the calculated attribute will display the Class Owner attribute (ID = 'ClassOwner') from the classification.

The calculated attribute formula could be written as:

{
    meta := iterate(iterate(classificationproductlinks(), 'CPLClassification()'), 'value("ClassOwner")'),
    listmeta := list2multivalue(meta)
}
concatenate(listmeta)

The ITERATE function shown in bold above returns a list of the internal 'labels' for the classifications. The surrounding ITERATE function scans through the list and gets the ClassOwner attribute value from the classifications.

The result is a list of the owners, separated by a multisep character tag as the list was converted to a multivalue list before being displayed.