Skip to main content
Version: 2025 R1

Merge attachments into a Word/PDF file

The action allows merging files added to the form's attachment panel, resulting in a single file created in the user-defined format.

Action_MergeFiles.png

Attachments to be processed

1. Category

The field allows users to select the category in which attachments will be searched. Apart from the categories defined in the process configuration by its designer, three built-in options are also available:

  • All – searches for attachments across all categories;
  • Dynamic – dynamically constructs a category (using variables from the editor) or allows manual entry. The acceptable formats are "ID#Name" or "ID".
    Attachments belonging to the specified category will be selected based on their ID. If searching by ID returns no results, the entered phrase will be treated as a name of a custom category (a category from outside the data source), and attachments belonging to this category will be returned;
  • None – searches for attachments not belonging to any category.

2. Convert

The field allows users to specify the format of attachments to be processed. Users can select one of the three options available in the drop-down list: All attachments (processes all attachments in supported formats), PDF (processes all attachments in .pdf format, including PDF/A files), or DOCX (processes all attachments in .docx format).

3. Regular expression

Users can define a regular expression to select attachments for merging. Clicking the Creator button located below the field opens the RegExLib creator tool.

4. SQL query

Selecting this option results in processing attachments based on the specified SQL query. The query should return the list of attachment IDs from the "WFDataAttachmets" table.

info

Files of the following formats can be merged into a PDF or PDF/A file:
.pdf, .jpg, .jpeg, .jpe, .jfif, .tif, .tiff, .docx, .dotx, .docm, .dotm, .doc, .dot, .xml, .odt, .txt, .htm, .html, .mhtml, .mht, .xhtml, .rtf, .xls, .xlw, .xlt, .xlm, .xlc, .xla, .xlsx, .xltx, .xlsm, .xltm, .xlsb, .ods, .gif, .png, .bmp, .dib, .ico, .csv, .sql, .json, .webp.

Files of the following formats can be merged into a DOCX file:
.pdf, .jpg, .jpeg, .jpe, .jfif, .tif, .tiff, .docx, .dotx, .docm, .dotm, .doc, .dot, .xml, .odt, .txt, .htm, .html, .mhtml, .mht, .xhtml, .rtf, .gif, .png, .bmp, .dib, .ico, .sql, .json, .webp.

Result file settings

5. File type

The drop-down list allows users to select one of the three formats for the file containing the merged attachments. The available file formats are: PDF, PDF/A, and DOCX.

6. Merge order

The field allows users to specify the order in which the attachments will be merged. The following options are available:

  • Chronologically – based on attachments last modification time;
  • According to name – lexicographical order;
  • According to SQL – order of the SQL query results.

7. Category

The drop-down list allows users to select a category to which the attachment will be allocated. Apart from the categories defined in the process configuration by its designer, three built-in options are also available:

  • The same category as source file – the attachment is allocated to the same category as the source file;
  • Dynamic – dynamically constructs a category (using variables from the editor) or allows manual entry. The acceptable formats are "ID#Name" or "ID". In this mode, it is possible to enter a category from within or outside the data source.
    If the category is provided in the "ID#Name" format, the source must contain a category with the provided "ID". If such a category is not found, the action will result in an error. If the category is provided as the "ID" only, and it is not found in the source, the entered phrase will be treated as a name of a custom category (a category from outside the data source).
  • None – the attachment is saved without a category.

8. Dynamic

The field becomes active after selecting the Dynamic option in the Category field.

9. Overwrite if attachment with this name already exists

If the option to overwrite files with the same name is checked, the category of the resulting file selected in the action configuration will be ignored. The overwritten file will remain in the same category as its previous version, and a new historical version of the file will be created.