Add Attachment Plug-in

The Add Attachment plug-in enables you to attach a document automatically to the attachment control at a given point in a workflow.

The document that is attached can reside in any of the following 3 locations:

  1. In a folder on the server (File and ControlBinding parameters are mandatory)
  2. On a form in another process (SourceBinding, SourceProcessID, and ControlBinding are mandatory)
  3. In a File Library (Folder, FileName, and ControlBinding parameters are mandatory)

Properties

Name Description Mandatory Group Name Modes
file

The location of an attached file. It must be the full file path from the server's file system.

Example:

Direct value: D:\Files\Public\Users\Daily-Records.xlsx

Value from form field: [/my:myFields/my:field2]

Value from solution field: [field1]

See above section re where documents can reside. Attachment Source Files
param_selector(Add Attachment From) A fixed plug-in parameter to allow the UI to select the Attachment Resolver source from Files, Form Process, and File Library.     All
controlbinding The attachment control binding to which the attachment is added. Yes From Control All
sourcebinding

The attachment control binding of the process defined in the sourceprocessid parameter.

Example:

Direct Value: Attachment_1, where Attachment_1 is the name of the binding

Value from form field: [/my:myFields/my:field2]

Value from solution field: [field1]

See above section re where documents can reside. Attachment Source Form Process
sourceprocessid

The process ID with which the 'extracted attachment' attaches to the attachment control. The specified process status must be "running." 

Specify the sourcebinding to define the attachment control binding.

Example:

Direct value: 5CE7CE49-6A9E-4300-B20D-0DCA2DCA1ABB

Value from form field: [/my:myFields/my:field2]

Value from solution field: [field1]

See above section re where documents can reside. Attachment Source Form Process
folder The folder name for the File Library containing the attached file. See above section re where documents can reside. Attachment Source File Library
filename

The file name, which has the same name as the folder. 

Example:

Direct Value: Daily-Records.xlsx

Value from form field: [/my:myFields/my:field2]

Value from solution field: [field1]

See above section re where documents can reside. Attachment Source File Library

You can use the Add Attachment plug-in to attach a resume to a form when, for example, you are on-boarding a new employee. This plug-in is also commonly used to attach PDF files or other supporting documents to a form (such as when you route an invoice through a series of approvals).

Note:

If the File (or Filename) and the Folder Name (or the SourceProcessID and the SourceBinding) are provided, the file will be validated and attached.

If the file name/path/binding etc. is invalid, an error will be thrown at run time - with the exception of the SourceBinding. If the SourceBinding is empty or if no attachment to the SourceProcessID is found, no error will occur.

If you leave these parameters blank in the form field value, no error will occur.

Preference of file upload

If a user provides multiple parameters, the attachment is added according to the priority below: 

  1. File parameter
  2. Both sourcebinding and sourceprocessid parameters
  3. Folder and filename

So, if all of these variations are provided (for example, ‘File parameter,' ‘sourcebinding and sourceprocessid’ and ‘Folder and filename’), the attachment is selected from ‘File parameter'. If two parameters are provided (for example, ‘sourcebinding and sourceprocessid’ and ‘Folder and filename’), the attachment is selected from ‘sourcebinding and sourceprocessid'.