ATC: ATTACH UPDATE options
This command changes matching attachments on a target document.
- options are optional. There are several options that can be used singularly or together, separated by spaces. Clearly, you will use at least one!
- FILTER filter; requires a semicolon (;) after it. This option specifies a filter for limiting the scope to those attachments that match. Use .NET Data Expression syntax (for more information see the Data Dictionary and .NET data expression syntax). If the filter option is omitted, all document attachments will be processed. The filter can also be assigned to a variable using ATC: SET; the semicolon goes after the variable name—not in the ATC: SET command.
- INCLUDE how specifies a new route include mode for the file and causes routed content to be recalculated. 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.
- NAME newname; is optional but requires a semicolon (;) after it. It specifies the new name for the file; bookmarks are expanded. Do not include the file type (extension) because the extension will be added automatically. If the name would be a duplicate, a (n) is added before the extension. Avoid periods inside the file name; do not include a file extension. The name can also be assigned to a variable using ATC: SET; however, the semicolon goes after the variable name—not in the ATC: SET command.
- REFRESH refreshes matching attachments that have bookmark replacement enabled, creating a new file version if necessary. The file will automatically be unlocked if necessary (but a checkout by another user will block the action). If the file was unlocked for the REFRESH, it is automatically re-locked unless it is included as assembled content. Note: if the file already has bookmarks frozen it cannot be processed by this command.
- FREEZE turns off future bookmark updates/refreshing. Manual editing remains possible unless the file is also locked.
- LOCK marks the attachment as LOCKED to prevent additional changes. If a refreshable file is locked, it is also automatically frozen.
- SYSLOCK marks the attachment as LOCKED to prevent changes by end users. An admin can unlock the file.
- 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.
Example
ATC: SET $TargetFolder = /Contracts ATC: SET $Filter = FileName LIKE '*.docx' ATC: SET $NewName = Updated for [DocHeader_SourceDocNo] ATC: ATTACH UPDATE FILTER $Filter; NAME $NewName; FOLDER $TargetFolder INCLUDE P
The above example means “place the string /Contracts into the variable name $TargetFolder and place files ending with .docx into the variable name $Filter then change all attachments with names matching $Filter so that they are in the $Targetfolder and include them in routed content as PDF. Change the file name too.”
Last updated: February 10, 2023 at 14:40 pm; green text = new