The NextDocFlow rules configure how the system responds to the Create Next command on the Document Options drop-down menu.
The NextDocFlow rule group is found in the Rules Maintenance tool on the System Admin Dashboard. Each rule in the group consists of a rule name, a filter value (which can be blank) and a result value.
Any Doc type
The NextDocFlow rules take any Doc type (as defined in the Doc Types tool and appearing on the filter drop-down) as the filter value. This Doc type represents the source Doc type used to create the new document.
Result values for the NextDocFlow rules depend on the rule and are indicated within the description of each rule. Some rules are enabled and disabled through a checkbox in the result value, for example:
Specifies (in the result value) which attachments should be copied from the source document to the new document. The result value accepts a Boolean expression that references fields in the result set of f_DocAttachments, its parents and its children. For example:
- AttachedDocMaster is NULL = copy only attached files, not documents.
- AttachedItemNumber is NOT NULL = copy only attachments associated with Items.
- AttachedItemNumber is NULL = copy only attachments not associated with Items.
- DocKey is NOT NULL = copy only attached files, not documents.
- False = do not copy any attachments (default).
- FileType = ‘PDF’ = copy only attached PDF files.
- True = copy all attachments.
Specifies (in the result value) the number of characters to be used to create a revision suffix on the base document number (DocNo). If the Doc type has a defined mask and the suffix length matches the last segment length, then the last segment is used. Otherwise, a dash and revision number are added. The default is 0 (meaning no revision number is calculated). The maximum is 9.
[V2019+] Specifies (in the result value) if the source document window should automatically close.
- False = source window stays open and moved left (default behavior prior to v2018)
- True = source window will close (default)
Specifies (in the result value) the semicolon-separated list of field names to be copied from the source document to the target document near the end of the creation workflow, but in a manner that differs from the default. By default, all fields are copied to the target document from the same fields in the source document. However, by default, RFQ Note fields are set to NULL by default. The syntax is targetable.field = sourcetable.field (so, for example, DocRevision.NoteA=DocRevision.NoteB would copy NoteB from the source document to NoteA in the target document. When sourcetable is omitted, the document header is assumed. When targetable is omitted, the source table is assumed. Other possible tables are DocRevision and DocRoute (for first route only). You can specify targettable.field=NULL;. See Additional Comments below for when in the process this rule applies.
Note: To override the default on RFQs, you can set FieldList = 0;
Specifies (in the result value) which inclusion and exclusion entries should be copied from the source document to the new document. The result value accepts a Boolean expression that references fields in the xsfInclusion table, its parents and its children. For example:
- False = do not copy any inclusion/exclusion entries.
- True = copy all inclusion/exclusion entries (default).
Specifies (in the result value) which Items should be copied from the source document to the new document. The result value accepts a Boolean expression that references fields in the xsfDocItem table, its parents and its children. Note: for Projects created from a bid, use SovConfig | SOVFromBid. For example:
- Billable = copy all Items marked as Billable.
- False = do not copy any Items.
- ItemStatus in ($$ItemStatusList) = copy all Items with the indicated Item status.
- ItemStatus not in ($$ItemStatusList) = copy all Items without the indicated Item status.
- True = copy all Items (default).
Specifies (in the result value) the rule group used to enumerate Item status codes. The enumerated codes are used to replace $$ItemStatusList in the Item Filter rule (above). If the ItemFilter rule does not contain $$ItemStatus, this rule has no effect. (See also KBA-01443.)
- DocItemStatusIsApproved = use the Item statuses enumerated in this rule group (see ).
- DocItemStatusIsClosed = use the Item statuses enumerated in this rule group (default)
Specifies (in the result value) the Doc type that is a model for the filter Doc type. This rule is useful when you have a custom Doc type that you want to behave like a standard Doc type. For example:
- Submittal = preserve Item numbers like on the Submittal Doc type.
- RFQ = renumber Items and set Quote Amount of new Items based on the Expense Amount of the source document like on the RFQ Doc type.
Specifies (in the result value checkbox) whether the original and new documents should be linked.
- unchecked = No (default).
- checked = Yes.
Specifies (in the result value) the text that appears in the Document Options drop-down menu. The default is Create $$ where $$ is the site name of the target Doc type, as specified in the TargetType rule (below).
Specifies (in the result value checkbox) whether the new documents should automatically open in a new browser window.
- unchecked = No.
- checked = Yes. (default)
Specifies (in the result value checkbox) whether the document items should be renumbered. This rule is ignored if the LikeFromType rule is Bid Package, OCO, PCO, RFQ, Submittal, Submittal Package (because these document types have specific internal requirements).
- unchecked = No (default).
- checked = Yes.
Specifies in the result value the semicolon separated list of fields names in DocItemTask that should be set back to null (if allowed) or an empty value.
- 0 = No fields reset (default).
- Quantity = Quantity field (default for UOP)
Specifies (in the result value) the name of the workflow script (from the Workflow library) to be run after the initial save of the target document, but in the context of the source document. The default is to not run any script. Note: include an ATC: SAVE command in the workflow script. (For more information about workflow scripts, see the ATC Scripts and Workflow technical white paper.)
Specifies (in the result value) the name of the workflow script (from the Workflow library) to be run after the initial save of the target document, but in the context of the source document. (The script will have no access to the new document other than through qAlias bookmarks.) The default is to not run any script. Note: include an ATC: SAVE command in the workflow script. (For more information about workflow scripts, see the ATC Scripts and Workflow technical white paper.)
Specifies (in the result value) the document states during which the Create Next option is enabled. Possible result values can be combined.
- 002 = In Process.
- 004 = Pending.
- 032 = Closed.
- 064 = Approved (default for most Doc types).
- 128 = No document of Target Type already attached [V2020+]
- 102 = Combines 64 + 32 + 4 + 2 (default for Submittals, RFIs and Commitments)
Specifies (in the result value) the Doc type that is created by a Create Next option on the source document. The default is none. Note: Submittal, Submittal Package, RFI, Potential CO, Change Order, Commitment, Bid Package and RFQ do not require this rule for their legacy target document types (described in the Focus on Doc Types and Project Workflow guide) but the target type can be overridden by this rule.
The NextDoc process:
- The new Doc type is determined per TargetType rule.
- The entire DocHeader and DocRevision of the source document are copied exactly. DocCopyConfig | FieldList is processed.
- Items, Attachments and Route are copied per the rules.
- Status of the new document is set to its default.
- The closed date of the new document is set to null.
- The new Doc Number is resolved.
- The new Doc Date is set to NOW.
- The new Owner Approver is set to null.
- Files are auto-attached per auto attach rules.
- The FieldList rule is processed (which can re-copy something nulled by default)
- The new document is saved.
- The RunScript rule is run.
- This rule can be used to blank out fields.
- This script should end with an ATC:SAVE.
- The RunScriptOnSource rule is run.
In addition, there are specifics for certain Doc types. See also the LikeFromType rule above.
- Potential Change Order to Owner Change Order
- Owner Approver is copied instead of being set to null.
- Title of PCO is used as the Revisions description on the Owner CO.
- Submittal to Submittal Package
- Source Contact is set to null.
- RFI to any Change Order
- The first Item is created from the RFI’s Response note field.
- Source Contact is to the Project Source Contact.
- Responsible is set to null.
- RFQ to Commitment
- Title is copied.
Note: See also DocCopyConfig for similar rules that cover slightly different use cases. Of particular note, the Create Next Meeting option uses the Doc Copy infrastructure, not Next Doc Workflow.
KBA-01517; Last updated: June 10, 2021 at 11:01 am; green text = new