ATC: ATTACH TEMPLATE [template] options
This command attaches a file created from an Attachment template to the target document. (Template type must be attachment, not Auto Attach or Attach All!)
- [template] is required. It specifies the Attachment template to use. You can specify the Attachment template in various ways:
- [filename] specifies the name of the Attachment template. The square brackets are required. The name must qualify based on template-matching criteria in the Templates tool.
- $VARIABLE when the name has been previously stored into the variable
- * indicates that the system should choose the default template.
- options can be zero or more of the following in any order
- AS [attachment-name]; specifies the name to be given to the new file, created from the template, that will be attached to the document and included in the Catalog. Square brackets are required only if spaces are included in the filename. You can use bookmark-style placeholders, within square brackets, as part of the attachment name. You can assign the name to a variable and reference the variable. Use a semicolon unless you place the AS clause last. The default is the Project ID followed by the template name followed by the document number and .filetype.
- INCLUDE how [V2018+] specifies the route “include” mode for the file. How must be one of the following:
- M to include the file assembled in routed content
- P to include the PDF version of the file in routed content
- 1 to include the native file in routed content
- 0 to exclude the file from routed content (i.e, not sent)
- FOLDER $FolderName is optional. $Foldername is any variable name into which has been placed a folder path.
- UI how is optional. It specifies whether the file should be shown on the Attachments tab. How must be either Hidden or Visible. The default is Visible.
ATC: EXIT HAS DocAttachedFile WITH FileName LIKE '*.docx'; ATC: ATTACH TEMPLATE [Inspection Template] AS [DocHeader_Project]_InspectionForm.docx
The above example means “exit if there is already a word attachment, otherwise attach a file called InspectionForm.docx preceded by the Project ID and created from the Inspection Template to the current document.”
ATC: ATTACH TEMPLATE [Lien Waiver] AS [DocHeader_Subcontract]_Waiver.docx
The above example is suitable for an ON CREATE Workflow means “attach a template file called Lien Waiver preceded by the Subcontract ID .” Doing an ATC: ATTACH TEMPLATE inside an On Create workflow makes all “auto attach” templates be ignored.
Last updated: September 23, 2023 at 21:33 pm;