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

AVEVA™ Work Tasks

Attachment

  • Last UpdatedNov 20, 2023
  • 10 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.
-Prefixing with @ is not supported when the Storage Type property is set to File System.

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.

Custom Style Sheet Identifier

Prefix for the CSS class name in the custom style sheet.

For information about using custom style sheets, see Custom Styles.

Note: The value must start with an alphabet and can contain only alphanumeric characters.

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 ConfirmationMessage 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 File System to store attachment in the file system.

    The default value is Database.

Note:
- File System as storage type does not support:
-- attachments that are part of lists.
-- archiving and purging.

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.

File Path Template

File path template for storing attachment in the file system for the control. For information about using file path template tags, see File Path Template Tags.

The default value is <StoragePath>\<Year>\<Month>\<Date>\<GUID>_<FileName>.<FileExtension>.

Note:
- This property is applicable only when the Storage Type property is set to File System.
- The <StoragePath> tag should be the first tag in the file path template, otherwise the file path template will be invalid.
- The application pool identity of the web application should have the appropriate rights to the folder where the attachments are stored.
- Date and time values resolved in file path template tags are in Universal Coordinated Time (UTC) format, and the time value is in 24-hour time format.

Allow Multiple Attachments

Allow or deny a user to attach multiple files for the control.

  • Select Yes to allow a user to attach multiple files for the control.

  • Select No to deny a user to attach multiple files for the control.

    The default value is No.

Note:
- This property is applicable only when the Storage Type property is set to File System.
- In AVEVA Work Tasks Pro for Android:
-- Multiple files can be attached only from the gallery, when the value of the property is set to Yes.
-- Only the first attachment gets attached when the value of the property is set to No.

Maximum Attachments

Maximum number for attachments for the control.

The default value is 5.

Note:- This property is applicable only when the Allow Multiple Attachments property is set to Yes.
- By default, the maximum value allowed is 10. If you want to change this, then override the AttachmentMaximumLimit entry in the Properties column in the SKRepository table of the Farm database.
-- For example, to override the maximum value allowed to 20, change [CDATA[<<Maximum Number of Attachments>>]] as follows:
<property key="AttachmentMaximumLimit"><![CDATA[20]]></property>
-- If the value specified is less than 2, then the value is taken as 2.
-- If the value specified is greater than 99, then the value is taken as 99.

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 AVEVA 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 uploading/downloading the 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.
- The upload limit is based on the settings for the maxAllowedContentLength setting in the web.config of the Enterprise Console Web Application. The default limit is 4 MB. Refer the Microsoft documentation for any changes to be made for increasing the upload limit.
- The attachment might take some time to upload when the system optimizes the database for storage of attachments.
- 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.
- When the Storage Type is set to File System, the attachment is not uploaded to the server immediately after clicking Upload. The attachment is uploaded when you:
-- submit the form (even in preview mode)
-- click Invoke Workflow (even in preview mode)
-- submit Pop-Up form (even in preview mode)
-- save as drafts
- Special characters “ “, “;”, and “,” in the file name of the attachment will be replaced with “_” in the downloaded attachment.

File Path Template Tags

Tag

Description

<StoragePath>

Resolves to the Attachment Storage Path specified while creating the repository.

For example,

If the specified Attachment Storage Path is

C:\ProgramData\Workflow Management\Attachments\,

it is resolved to

C:\ProgramData\Workflow Management\Attachments\

Note: The <StoragePath> tag should be the first tag in the file path template, otherwise the file path template will be invalid.

<Year>

Resolves to the current year in yyyy format.

For example,

If the current date is June 7, 2018

it is resolved to

2018

<Month>

Resolves to the current month in MM format.

For example,

If the current date is June 7, 2018

it is resolved to

06

<Date>

Resolves to the current date in dd format.

For example,

If the current date is June 7, 2018

it is resolved to

07

<Hours>

Resolves to the current hour in HH format.

For example,

If the current time is 10:02:03.004 PM,

it is resolved to

22

<Minutes>

Resolves to the current minute in mm format.

For example,

If the current time is 10:02:03.004 PM,

it is resolved to

02

<Seconds>

Resolves to the current second in ss format.

For example,

If the current time is 10:02:03.004 PM,

it is resolved to

03

<Milliseconds>

Resolves to the current millisecond in mmm format.

For example,

If the current time is 10:02:03.004 PM,

it is resolved to

004

<GUID>

Resolves to a UUID in RFC4122 version 4 (random) format (xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx)

For example,

527ee1d8-2c01-4d0a-b3c1-a8b121ca020b

<FileName>

Resolves to the original file name of the attachment.

For example,

If the attached file is Keywords.doc,

it is resolved to

Keywords

<FileExtension>

Resolves to the original file extension of the attachment.

For example,

If the attached file is Keywords.doc,

it is resolved to

doc

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