This documentation supports the 22.1 version of BMC Helix Innovation Studio.

To view an earlier version, select the version from the Product version menu.

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 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 administrator, but cannot customize the objects developed in com.bmc.arsys in Best Practice Customization mode. For example, objects in core BMC applications like Foundation, Approval, and Assignment cannot be customized in Best Practice Customization mode. For more information, see Customization layer

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

  1. Log in to BMC Helix Innovation Studio and navigate to the Workspace tab.
  2. Select the application to which you want to add the Image component. 
  3. On the Views tab, click the name of the view definition to which you want to add the Image component.
  4. From Palette, drag the Image component to the canvas.
  5. In the Properties pane, click the  Settings icon, and complete the fields as described in the following table:

    Field

    Action

    Name

    Enter a name to uniquely identify the Image component.

    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 alignmentSelect the appropriate alignment for the image.
    Maximum width
    Specify the maximum width for the image in pixels or percentage.
    The default value for this property is the original width of the image.

    Important: If these fields are blank, the image is displayed by using its original dimensions.

    HiddenSelect if you want to hide this field.
    Available on devices

    From the following device options, select the devices on which the component should be visible:

    • Desktop
    • Mobile
    • Tablet

    By default, all the three options are selected. 

  6. 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.
Was this page helpful? Yes No Submitting... Thank you

Comments