Displaying images from attachments at runtime
As a developer or an application business analyst, you can configure a view definition to display images from attachments. The images are displayed in the application.
Use the Image view component to display an image stored in an attachment field. For example, you can display an avatar stored in an attachment field.
Important
Application business analysts can customize the objects developed in their own applications and that are marked customizable by the developers. However, they cannot customize the objects developed in com.bmc.arsys.
For example, you cannot customize objects in core BMC applications like Foundation, Approval, and Assignment.
Before you begin
Make sure that you have created an attachment field in the record definition.
To learn more about adding attachment fields, see Creating or modifying regular record definitions.
To add an image view component to a view definition
- Log in to BMC Helix Innovation Studio and navigate to the Workspace tab.
- Select the application to which you want to add the Image view component.
- On the Views tab, click the name of the view definition to which you want to add the Image view component.
- From Palette, drag the Image view component to the canvas.
In the Properties pane, click the
Settings icon, and complete the fields as described in the following table:Field
Action
Example Record Definition Name
Select the record definition that contains the attachment field in which the image is stored.
Field Name
Select the attachment field of the record definition in which the image is stored.
Record ID
Click Edit to build an expression that points to the record instance ID.
Horizontal Alignment Select the appropriate alignment for the image. Maximum Width Default value—The original width of the image.Specify the maximum width for the image in pixels or percentage.Note: If these fields are blank, the image is displayed by using its original dimensions.
Hidden Select if you want to hide this field. Click Save.
To verify the view definition, click Preview.
Result
After configuring the Image view component, the following conditions describe how the image is rendered:
- Attached image is valid—Image is displayed correctly.
- Attached image is invalid—Image is not displayed. An icon indicating broken image is displayed.
- Attachment is absent—Image is not displayed.
Comments
Log in or register to comment.