Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Attachment

  • Last UpdatedJan 21, 2025
  • 7 minute read

Use Attachment control to attach a file in your form.

Properties

The properties for the control are grouped under the following tabs:

Basic

Property

Description

Name

Name that identifies the control. This value is also used for the label of the control.

XML Node

XML node mapped to the control. Use this value to map a list to a form and a form to a workflow.

  • Prefix with @ to use the value of the control as an attribute with the immediate parent node. For example, @FirstName.

  • Use / for a parent-child node configuration to uniquely identify a control in a form with multiple containers. For example, Employee/FirstName.

    The default value is the value for the Name property without the spaces.

Note:
- If you use / to denote a parent which is not a container and the parent is at the same level as that of the child, then the XML node for the control is not generated.
- If you edit this value later, then it might affect the mapping between forms, lists, and workflows.

Description

Description for the control.

Tooltip

Message that appears when the pointer hovers over the control.

Appearance

Property

Description

Enable

Enable or disable the control.

  • Select Yes to enable the control.

  • Select No to disable the control.

    The default value is Yes.

Visible

Show or hide the control.

  • Select Yes to show the control.

  • Select No to hide the control.

    The default value is Yes.

Label Position

Position of the label for the control.

  • Select Default to allow the system to align the label. The system aligns the label to the left of the control or as specified by the container control.

  • Select Left to align the label to the left of the control.

  • Select Top to align the label to the top of the control.

  • Select Right to align the label to the right of the control.

  • Select Bottom to align the label to the bottom of the control.

  • Select Suppress to hide the label for the control.

    The default value is Default.

Note:
- If the value is Default and the control is placed on a container control, then the value of the Label Position property of the container control determines the position of the label for the control.
- For example, if the value is Default and the control is placed on a Base Form with Label Position property set to Top, then the label is aligned to the top of the control.

Label-Control Area

Area occupied by the label and the control in percentage.

  • Select Default to allow the system to set the label and the control areas.

  • Select Custom to specify the label area. The control area is automatically set based on the label area.

    The default value is Default.

Note:
- If the value is Default and the control is placed on a container control, then the value of the Label-Control Area property of the container control determines the area of the label for the control.
- This is applicable only when the Label Position is set to Left or Right.

Retain Space

Reserve or remove space when the control is hidden.

  • Select Yes to keep space when the control is hidden.

  • Select No to remove space when the control is hidden.

    The default value is No.

File Name Length

Length of characters for the file name.

The default value is 0.

For example, if the value is set to 8 and the file name of the attachment has 12 characters, then only the first 8 characters of the file name are retained. If the file name of the attachment has 6 characters, then the file name is retained as is.

The abbreviated file name is displayed in the form. However, when you download the file, the name of the file is retained as is.

Note: If the value is 0, then the file name is retained as is.

Validation

Property

Description

Attachment Type

File type of attachment for the control.

  • Select Images to restrict the file types of attachment to images (BMP, DIB, GIF, JFIF, JPE, JPEG, JPG, and PNG).

  • Select Tagged Images (TIFF) to restrict the file types of attachment to tagged images (TIF and TIFF).

  • Select Portable Documents (PDF) to restrict the file types of attachment to portable documents.

  • Select Office Documents to restrict the file types of attachment to office documents (DOC, DOCM, DOCX, DOTM, DOTX, MPP, MPT, POTM, POTX, PPAM, PPSM, PPSX, PPT, PPTM, PPTX, SLDM, SLDX, THMX, XLAM, XLS, XLSB, XLSM, XLSX, XLTM, XLTX, and XSN). 

    The default value is Images.

Note: 
- If no option is selected, then you can attach only image type files (.jpg, .jpeg, .png, .jpe, .jfif, .bmp, .dib, and .gif).
- You cannot attach the files that have .EXE extension as it is not supported.

Custom Attachment Type

Custom file type of attachment for the control.

For example, .txt;.rtf to restrict the file types of attachment to text and rich text formats.

Note: This value disables the Attachment Type property and restricts the  allowed file type to the value specified.

Show Delete Confirmation Message

Show or hide the custom delete confirmation message for the control.

  • Select Yes to show the custom delete confirmation message for the control.

  • Select No to hide the custom delete confirmation message for the control.

    The default value is No.

Delete Confirmation Message

Delete confirmation message for the control.

Note: This property is applicable only when the Show Delete Confirmation Message property is set to Yes.

Advanced

Property

Description

On Data Change

Run a script when value of the control changes.

For more information, see scripting guidelines for On Data Change property.

ID

Reference identification code for the control. This value is automatically generated and cannot be changed.

Storage Type

Storage type of attachment for the control.

  • Select Database to store attachment in the database.

  • Select AVEVA Cloud Storage to store attachments in CONNECT storage.

    The default value is Database.

Note: The uploaded file name should be 87 characters long (120 - 33 = 87) for Ingestion. If the file name contains special characters or spaces, each of these would count as three characters. Therefore, it is advisable to keep file names short when uploading them to AVEVA Drive.

Security Mode

Set the security mode to None or Encryption to secure the attachment.

  • Select None to have the value for the attachment in database as Base64 encoded.

    The value in Form Instance XML will not be encrypted.

  • Select Encryption to have the encrypted value for the attachment in the database as BLOB.

    The value in Form Instance XML will be encrypted.

    The default value is Encryption.

Note: This property is applicable only when the Storage Type property is set to Database.

Persist File Name

Keep the file name of the attachment as the header.

  • Select Yes to keep the file name.

  • Select No to rename the file.

    The default is Yes.

Note: This property is applicable only when the Storage Type property is set to Database.

Persist Custom File Name

ID of the Text control whose value is used as the header.

If you do not want to persist the file name, then you can persist a custom file name in another control. The Persist Custom File Name property takes the ID of a Text control where it can store the attached file name information. You can then get the file name from this control through scripts.

To select the Text control

  1. Click the Persist Custom File Name button.

    The Text Control Configuration page appears.

  2. In the Text Control list, select a Text Control.

  3. Click Save & Continue.

    The ID of the selected Text control is set for the Persist Custom File Name property.

    Note:
    - This property is applicable only when the Storage Type property is set to Database.
    - We recommend to have the Text control in the same container where the Attachment control is present.

Source Type

Source type of attachment for the control.

  • Select Camera to capture the image and store it in the selected storage type.

  • Select Gallery to select the existing file and store it in the selected storage type.

  • Select Camera and Gallery to either capture the image or select the existing file.

    The default value is Camera and Gallery.

Note:
- This property is available only for Work Tasks Pro app.
- For UWP, this property is not applicable.
- For iOS, the Gallery option opens both the camera and gallery file picker options.

Scripts

For information about using scripts, see scripting guidelines for Attachment control.

Note:
- We recommend to keep the file size lesser than 30 MB to avoid errors during the upload. Also, you can download a file only if the size is 30 MB or lesser.
- The request timeout controls the time taken for a request to process, which also controls the uploading/downloading file. So, it is recommended to set the Request timeout to an appropriate value as per the upload limit set in the environment. The default value for the request timeout is set to 900 secs.
- When the Storage Type is set to Database, the attachment is uploaded to the server immediately after clicking Upload.
-- The uploaded attachments are stored in the Data column of the SKEListItemDataTemp table.
-- The Attachment control value securely holds information to the location where the attachment is stored.
-- The uploaded attachment cannot be retrieved or processed through workflows and so on.
- Special characters like , ; and space in the file name of the attachment will be replaced with “_” in the downloaded attachment.
- To upload the attachment file to AVEVA Cloud Storage, make sure the user has Work Tasks File Reader Writer role in CONNECT.

Related Links
TitleResults for “How to create a CRG?”Also Available in