Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Using the Attach Content control

Updated on March 20, 2020

The Attach Content control (pxAttachContent) allows you to attach an image file to either a desktop application or to a mobile application that uses the Pega 7 mobile app. This control can be formatted to display to users as a button, link, or icon, and utilizes responsive UI for its file attachment screen, allowing it to conform to various UI sizes across any devices accessing the application.

Note that once the file attachment process has been activated for both desktop and mobile applications, users are unable to proceed until either attaching a file or canceling out of the attachment action.

Using the control

In a desktop application, using the Attach Content action displays the default file browser window, allowing users to select image files to attach to their application by either browsing in a local directory for a file or dragging and dropping files on to the attachment window. When using a desktop application, users can upload any image file type.

In a mobile application, using the Attach Content action displays a window with actions specific to each operating system:

  • On iOS devices, users can select an image file from the mobile device's camera roll.
  • On Android devices, users can select where to retrieve an image file from using a tiled list of applications, which includes the device's image gallery, Google Drive, Dropbox, and any other related file storage applications installed on the device.

The control also works on certain mobile browsers, such as Safari on iOS devices and Chrome on Android devices. Refer to the Platform Support Guide for a list of the mobile devices and browsers that support this control.

Configuring the control

Follow these steps to add pxAttachContent to your application:

  1. In Designer Studio, add a control from the Basic menu to a section or layout.
  2. Click the Gear icon for the control to open the Cell Properties window.
  3. Next to the control name, click the change link and select Attach content.
    button_attachcontent.png

Using the General tab

Once the control is configured to use Attach Content, use the fields on the General tab to specify how the control appears to users.

In the Content Type menu, select Image.

In both the File Name and Category fields, select Property Reference.

  • Selecting this option allows the control to use the correct context if present in a grid.

  • For example, if there is a list of employees in a grid that states their name and job position, and an Attach content control is present in each row within the grid (or is user selectable), the corresponding value is used for each attachment performed within a row.
  • Refer to the Pega 7 help documentation for more information on using attachment categories.

In the Format Type menu, select how to display this control: either as a button, link, or icon. Selecting one of these options causes additional fields to display for each respective choice:

Button

Use the Button caption field to customize the text displayed if the Attach Content action is selected to display as a button.

formattype_button.png

See the Adding a Button control help topic for more information on configuring the control as a button.

Link

Use the Link caption field to customize the text displayed if the Attach Content action is selected to display as a hyperlink.

formattype_link.png

See the Adding a Link control help topic for more information on configuring the control as a link.

Icon

Use the Icon source field to specify the location of the image shown to users if the Attach Content action is selected to display as an image or icon.

formattype_icon.png

See the Adding an Icon/Image control help topic for more information on configuring the control as an icon/image.

Using the Presentation tab

Based on the selected UI element (button, link, or icon) in the Format Type field, the format is filtered accordingly on the Presentation tab.

Using the Actions tab

Any on-click actions set on the Actions tab are executed after a selected file is uploaded. Other events, such as "refresh action", can also be configured for the on-click action for this control, and are executed after the inherited behavior.

Tags

Pega Platform 7.1.7 Low-Code App Development User Experience Mobile

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us