Adding and Configuring the AttachmentViewer

The AttachmentViewer control allows you to download and view attachments.

  1. In the Mobile Workflow Forms Editor, select Screen Design > Palette > Controls.
  2. Click AttachmentViewer and then click on the screen.
  3. Configure the Attachment Viewer from the Properties view:
    1. Select the AttachmentViewer control.
    2. Click the Properties tab.
      If you do not see the Properties tab, right-click anywhere in the Screen Design page, and select Show Properties View.
    3. Click General in the left pane to configure the general properties for the AttachmentViewer.
      The AttachmentViewer control can be bound to data in one of two ways:
      • Keys, or
      • Object queries
      Property Description
      Label
      • Label – enter the text that describes the control on the user interface.
      • Label position – the position of the label in relation to the control it describes.
      Input data binding Select the key with which to bind the AttachmentViewer control, or click New key to create a new key. The key represents a binary attribute, which will be the contents of the attachment.
      • Key – the unique identifier within the scope of the workflow form, used when setting or retrieving a value.

        Click New key to create a new key for the control.

      • Default value – default value for the control.
      Read-only Select to make the control read-only.
      Content The other way you can bind the AttachmentViewer to data is by using an object query and mapping the parameters of the object query to keys. Indicate which binary attribute of the object query corresponds to the contents of the attachment.
      • Use object query –select to invoke a specified object query.
        • Mobile business object – select the mobile business object that contains the object query to invoke
        • Object query – specify the object query to invoke
        • Attribute –specify the binary attribute value that corresponds to the attachment contents
      • MIME type key – mime type for attachments that are supported, for example, *.doc, *.xls and so on
      • File name – name of the file
      • File size – size of the file
        Note: Attachments requested on demand are limited to 5MB after Base64 encoding.
  4. (Optional) Click Parameter Mappings to bind the parameters (if any) of an operation or object query to keys or, context data, such as DeviceName, BackEndPassword, BackEndUser, and so on
  5. (Optional) Click Personalization Key Mappings if you have a mobile business object with load parameters mapped to session personalization keys, and want to specify values for those personalization keys when you invoke an operation or object query from the Mobile Workflow package.
    This can be useful for loading only specific data into the consolidated database from large data sources.
  6. Select File > Save.