ATC: ATTACH FILE [full filename] COMMENT text
ATC: ATTACH DUPLICATE [full filename] COMMENT text
ATC: ATTACH FILE $FileKey COMMENT text
ATC: ATTACH FILE PROJECT Project FOLDER [full path] NAME [name.ext] COMMENT text
This command attaches a link to a file already in the Spitfire Catalog to a document being created or modified by the workflow script. [See ATC: ATTACH DUPLICATE if the intention is to attach a clone of a file to the document instead.]
- [full filename] must begin with an open square bracket. This legacy version of the command is seldom used because it does not scale well.
- $FileKey can be any variable name. The variable should contain a file key, likely returned from a qAlias (see example)
- PROJECT when specified must be the first option and must be followed by FOLDER and NAME. Project can be a variable or a project ID
- FOLDER must immediately follow PROJECT and must be followed by NAME. [full path] must be in brackets and begin with a slash (/). You can use a $variable.
- NAME must immediately follow FOLDER [name.ext] must be in brackets. You can use a $variable. Examples would include sample.docx and insuranceCert.pdf.
- COMMENT text is optional. The text will appear as a note on the Attachment tab.
TargetRow is set to the new attachment
A save transaction is required to save the new attachment. Use ATC: SAVE if necessary (but save is implied in many workflows).
Example
ATC: ATTACH FILE [/Compliance Forms/W9.pdf] COMMENT blank W9 form to be completed and returned
The above example means “attach the W9.pdf file that is found on the Compliance Forms folder in the Catalog to the document and add the note blank W9 form to be completed and returned to the grid on the Attachment tab.”
ATC: QUERY qRelevantFiles ATC: FOREACH qRelevantFiles BY ReferenceDate ATC: SET $FileKey = @.FileKey ATC: ATTACH FILE $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 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: June 27, 2025 at 19:34 pm