Previous Topic

Book Contents

Book Index

Next Topic

Assign Images to Object Categories

Task: We want each component type to be displayed with the image assigned to its component class. This way all component types of the Keyboard component class will be displayed as keyboard, all component types of the LCD Monitor component class will be displayed as an LCD, etc.

As a prerequisite, let's assume that we have images assigned to component type classes (as described in Assign Images to Specific Objects).

To have component types inherit the images from their component type classes, we have to:

  • Define an attribute which represents identification of the image (for the Object Type - in this example, it will be Component Type).
  • Create a calculation which fills this attribute with data taken from the classification object type (component type class in our example).
  • Create a rule which performs the calculation.

Define the Attribute

The process of defining the attribute is analogical to the one described in Assign Images to Specific Objects.

Create a Calculation

  1. In the Calculation Customizer, create a new calculation for the object type which should inherit the images (here: Component Type). Attribute For Result should be the attribute which has been specified as the imageAttribute (here: shorttext)
  2. In the formula itself, create an expression from the untranslated name of the object type from which the image is to be inherited and name of the imageAtrribute in that object type. Example: 'typeclass.shorttext'

Note: When creating the calculation formula, remember to use the apostrophes, as illustrated in the screen shot below.

Create a Rule

  1. In the Rule Customizer, create a new rule for the object type which should inherit the images (here: Component Type). Rule type will be Calculation, the rule will be started if a condition is true (no condition specified).

    Help Image

  2. On the Calculations tab, specify the calculation created in the previous step.

    Help Image

  3. Finish the rule creation and you are done.

    When you open the editor of a component type now, the component type should be displayed with the same images as their corresponding component type classes.

See Also

Image Assignment

Assign Images to Specific Objects

Assign Images From Attachments