Previous Topic

Book Contents

Book Index

Next Topic

Name-independent Attachments

In the Assign Images From Attachment topic we described how to customize Valuemation so that objects of a particular object type get displayed with images read from their attachments. The key step there was creating a calculation in which the name of the attachment was explicitly specified. Consequently, the attached images had to bear exactly this name for Valuemation to recognize them.

As an alternative, it is possible to create a calculation which does not rely on the attachment name but instead takes into account the attachment position. This way you can specify that e.g. the first (second, third - in the order in which files have been attached) of the object's image attachments should be used as the object's image.

The calculation formula will then have the following format:

'ATTACHMENT:#image number'

where image number is the attachments position, starting with 0 for the first attachment.

Example:

Let's have a person with two image attachments:

Help Image

We want the first attachment to be used, regardless of its name.

The calculation then will have to be:

Help Image

If we were to use e.g. the second position attachment, this is what we would do:

Help Image

Using the above explained calculation formula frees us from having to give all attachments meant the same specific name. It will be enough to maintain some kind of consistent naming scheme to make sure that the first attachment is always the most suitable one for the image.

See Also

Working With Images

Image Assignment