ATC: ATTACH DUPLICATE [full filename] COMMENT text

This command attaches a clone of a file already in the Spitfire Catalog to a document being created or modified by the workflow script. [See ATC: ATTACH FILE if the intention is to attach a link to an existing file instead.]

  • [full filename] is required. It specifies the full catalog path and filename for the file. The square brackets are required.  If you specify a $variable, the variable can contain either the path and name, or it can specify the attachment key
  • COMMENT text is optional. The text will appear as a note on the Attachment tab.

Examples:

ATC: ATTACH DUPLICATE [/Compliance Forms/W9.pdf]

The above example means “create a cloned copy of the W9.pdf file that is found on the Compliance Forms folder in the Catalog and attach it to the document.”

ATC: QUERY qRelevantFiles
ATC: FOREACH qRelevantFiles BY ReferenceDate
   ATC: SET $FileKey = @.FileKey
   ATC: ATTACH DUPLICATE $FileKey COMMENT relevant file
ATC: ENDLOOP

The above example means “run a query that returns a list of relevant files and for each file returned, set the $FileKey variable to the file key and attach a cloned copy of the file to the document.”  In this simplified example, there is no meaning to what represents a relevant file – it might involve file type, date range and other criteria.  The query should NOT return files already attached to the document.


Last updated: August 1, 2023 at 8:28 am  

Related Post

ATC: SENDATC: SEND

ATC: SEND FROM email  TO email  SUBJ text; BODY variable options This command sends an email to the person or persons specified. “Route Via” is not relevant and contacts without

ATC: RELEASEATC: RELEASE

ATC: RELEASE option This command immediately releases (sends on to the next routee) another document that is currently routed to “Spitfire.” option is optional. There are several options but you

ATC: CLOSEATC: CLOSE

ATC: CLOSE This command sets the closed date on the current document to today. This effectively closes the document, regardless of status. Example ATC: CLOSE The above example means “close