KBA-01364: Automatic Attachments

Question:

Can I automatically attach certain files in the catalog to every new document of a certain Doc type (such as Commitment)?

Answer:

The following rules in the DocTypeConfig rule group control the automatic attachment feature.

  • AutoAttach—The Result Value specifies a DocType GUID and an optional status that act as the source for a collection of automatic attachments. The attachments found on those documents are automatically attached to new documents of the type indicated in the filter value.  For example 715D2C09-EE06-46FB-ADEE-801FE9954245;S will copy all attachments from any Drawing documents with status S.  (Separate the GUID and status code with a semicolon.) You can include multiple pairs of source type and statuses, for example 715D2C09-EE06-46FB-ADEE-801FE9954245;S;715D2C09-EE06-46FB-ADEE-801FE9954245;V.  You can vary Doc type and/or status; use ;; for all statuses with a given type.
  • AutoAttach:subtypeSame as above, but sensitive to the target (filter) document‘s subtype.  This rule has no effect if a Result Value has been specified for AutoAttach (no subtype) for the same filter Doc type.
  • AutoAttachFromDoc—The Result Value specifies one or more specific document GUIDs separated by semicolons.  The attachments found on these documents are attached to new documents of the Doc type indicated in the filter value.  (For hints on getting the GUID for a specific document, see KBA-01076.)
  • AutoAttachFromDoc:subtypeSame as above, but sensitive to the target (filter) document‘s subtype.  This rule entry has no effect if a result value has been specified for AutoAttachFromDoc (no subtype) for the same filter Doc type.
  • AutoAttachIXFilter – The result value indicates whether or not inclusions and exclusions should also be copied from the documents identified by the AutoAttach* rule entry to documents of the filter Doc type.  This rule entry is ignored unless an AutoAttach* rule has also been specified.   The default result value is FALSE (meaning that no entries will be copied).  Use TRUE if you want inclusions and exclusions to be copied.
  • AutoAttachIXFilter:subtypeSame as above, but sensitive to the target (filter) document‘s subtype.

Examples:

AutoAttach:SU→Commitment→715d2c09-ee06-46fb-adee-801fe9954245;S

AutoAttachIXFilter:SU→Commitment→TRUE

The first row means when a Commitment document with a subtype of ‘Subcontract‘ (code = SU) is created,  all files from the Drawings document with a status of Setup (code = S) will be copied to it.

The second rows means when the above happens, the Inclusions and Exclusions will be copied also.

Additional Comments:

Note: you can copy a DocType‘s GUID to the clipboard at the Doc Types tool and then paste it into the result value for these DocTypeConfig rule entries. For more information about Rules, see the technical white paper Rules and Rule Values.


KBA-01364; Last updated: October 20, 2016 at 12:11 pm;
Keywords:  automatically attach files to documents, automatically copy inclusions and exclusions