Previous Topic

Book Contents

Book Index

Next Topic

Assign Images From Attachments

Task: To have a specific image displayed with each person. These images should be drawn from the attachments of the Persons objects.

As a prerequisite, usable images have to be added to Valuemation resources. See Adding an Image for more information.

In order to have attachment images displayed with specific business objects, it is necessary to:

  • Define an attribute (for the object type - in this example it will be Person) which represents identification of the image.
  • Create a calculation which fills this attribute with data taken from the object attachments.
  • 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. In our example, we are dealing with the Person object and we have selected the persInfo string attribute to serve as the Image Attribute.

Create a Calculation

  1. In the Calculation Customizer, create a new calculation for the object type whose objects will have the images attached (here: Person). Attribute For Result should be the attribute which has been specified as imageAttribute (here: persInfo)

    Help Image

  2. In the formula itself, create an expression in the following format:

    'ATTACHMENT:CatalogPhoto'

    The CatalogPhoto is the name of the attachments which will be used for the image.

Note: When creating the calculation formula, remember to use the apostrophes.

Specifying the calculation formula as in the example above means that whenever we will be attaching an image which is meant to be used in Valuemation, we will name the attachment CatalogPhoto. (If you do not like having to remember how to name the attachment, see Name-independent Attachments.)

Help Image
The Person editor: attaching an image. See the Pictures in Views help topic for more information.

Create a Rule

  1. In the Rule Customizer, create a new rule for the object type whose objects will have the images attached (here: Person). Rule type will be Calculation, the rule will be fired if a condition is true (no condition specified).
  2. On the Calculations tab, specify the calculation created in the previous step and finish the rule creation.

If the Person objects in your database already have image attached, these should be now displayed on Person's view. Otherwise, you will need to attach suitable images, see the Pictures in Views help topic for more information.

See Also

Examples and Consequences

Assign Images to Specific Objects

Node Style Assignment

MultiLine Catalog Customization

Adding Attributes to Relation Lines