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.
Note: |
|
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.
|
|
Visible |
Show or hide the control.
|
|
Label Position |
Position of the label for the control.
Note: |
|
Label-Control Area |
Area occupied by the label and the control in percentage.
Note: |
|
Retain Space |
Reserve or remove space when the control is hidden.
|
|
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.
Note: |
|
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.
|
|
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.
Note: |
|
Security Mode |
Set the security mode to None or Encryption to secure the attachment.
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.
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
|
|
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: |
|
Allow Multiple Attachments |
Allow or deny a user to attach multiple files for the control.
Note: |
|
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. |
|
Source Type |
Source type of attachment for the control.
Note: |
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 |