Navigation: DocScript Reference >

DocScript System Variables

 

 

 

 

This page list the different system variables that can be used with DocScript.

 

 

Batch Related System Variables


The following table details the system variables related to batch based operations:

 

Variable Name

Description

{batchn}

The name of the current batch.

{batchlbl}

The Label of the current batch.

{batchdocs}

An array documents inside the batch, used in Distribution.

{cbatchdoc}

Current position in the batchdocs array.

{cbatchsts}

Current batch processing status ID.

{bbatchsts}

Current batch status ID before processing.

{abatchsts}

Current batch status ID after processing.

{ebatchid}

Current error batch ID. 0 if the batch is not in error.

 

 

Document Related System Variables


The following table details the system variables related to document based operations. The name of the document in location2 with the extension, excluding the path. Note, this is typically used for document renditions.

 

Variable Name

Description

{docid}

The Document ID of the current document.

{filepath}

Stores the Root Address of the document. This also includes any calculated folders to provide the actual path to the document.

{filepathrel}

Stores the Relative Root Address of the document. This also includes any calculated folders to provide the actual path to the document.

{docname}

The name of the current document with the extension, excluding the path.

{docname2}

The name of the current rendition document with the extension, excluding the path.

{docnamenx}

The name of the current document without the extension, excluding the path.

{docname2nx}

The name of the document location 2 without the extension, excluding the path.

{fdocname}

The name of the current document with the extension, including the path.

{fdocname}

The name of the current document with the extension, including the path

{docpath}

The full path of current document in the DocuNECT storage location.

{docpath2}

The full path of document in location 2 in the DocuNECT storage location.

{odocname}

The name of the current document from its source location, excluding the path.

{odocname2}

The name of the document in location 2 from its source location, excluding the path.

{odocnamenx}

The name of the current document from its source location without the extension, excluding the path.

{odocname2nx}

The name of the document in location 2 from its source location without the extension, excluding the path.

{ofdocname}

The name of the current document from its source location with the extension, including the path.

{ofdocname2}

The name of the document in location 2 from its source location with the extension, including the path.

{odocpath}

The current document file path from its source location without the name of the document, without the trailing "\".

{odocpath2}

The document in location 2 file path from its source location without the name of the document, without the trailing "\".

{ignore}

If set to True, it allows a document to be ignored during capture, indexing or distribution.

{docpages}

Used when documents are split into smaller documents using business rules. The docpages is an array that stores the documents broken down from a master document.

{luidxnames}

AX Used in Capture or Distribution to store an array of index names to be used in a lookup against the target document management system.

{luaction}

AX This is used in conjunction with luindxnmes. If a match found of the all the index values referenced in the luidxnames then luaction determines what function to perform:

 

newdoc - creates a new document

appenddoc - appends the current document found

newver - creates a new version of the document found. Append currently works with TIFF documents

{revcomment}

This is the revision comment of the document being added to the system.

{docrevision}

This is the version no of the document being added to the system.

{idxfilename}

If you are using an index file for Capture or Distribution then this is the name of the index file.

{docusername}

This allows the user to be assigned to a document for distributed indexing.

{owinuser}

The originating Microsoft Windows of the document.

{odcnuser}

The originating DocuNECT of the document, typically used by the Client Tools.

{odcnuseremail}

The email address of the originating DocuNECT user. Typically this is used in conjunction with Client Tools, for example, send the originating user an email after the process is complete.

{docrolename}

This allows the role to be assigned to a document for distributed indexing.

{error}

This returns 1 if there is an error on the document and can also be set to 1 to force a document into an error batch.

{errormsg}

This is used in conjunction with {error} and stores the associated error message with the error.

{processstate}

Indicates the current lifecycle stage, and is automatically set to either Capture, Index, or Distribute.

{subfolder}

This is used for Distribution and allows a sub-folder path to be specified.

If Files Per Folder is set to 0 then it uses the {sub-folder} variable relative to the Address field in the lifecycle. For example: <Address Folder>\<Date Time Stamp>\<Sub-Folder>.

If Files Per Folder is set to -1 then it uses the {sub-folder} variable relative to the Address field in the lifecycle. For example: <Address Folder>\<Sub-Folder>.

If Files Per Folder is set to greater than 1 then the {sub-folder} variable is not used.

 

Note, this is used for File, FTP and Secure FTP distributions.

{indexername}

This is retrieves the name of the user that last indexed, edited or verified the document from the document history.

{continue}

Determines the behavior of when errors are found in the batch.

 

0 - Stops if errors are found.

1 - Continue processing if errors are found.

 

Note, default is 0 if not set.

{doctext}

This is the text that was extracted from the document from the OCR or Render connector.

{captureid}

The ID of the lifecycle capture.

 

 

General System Variables


Variable Name

Description

{squote}

This is literal for a '.

{crlf}

This is a literal for carriage return, line feed.

{debug}

This indicates whether the connector you are running is in Debug mode in the associated lifecycle connector.

{lognote}

In the Notifications tab a list of email addresses can be assigned in the Send Notification Log To email address. The {lognote} variable is custom text that is sent in the email. If {lognote} is blank then no email is sent.

{helpurl}

This is the help URL defined in the system settings.

{dcnversion}

The current DocuNECT version.

{websiteurl}

The current DocuNECT web site URL defined in the system settings.

{defaultfilename}

It stores the default file name of the document. In a DocuNECT Cabinet a defaultfilename format can be defined. In DocuNECT Web, when downloading a document, it automatically uses the defined defaultfilename. Also the name of the file is displayed in the search.

{lname}

The current lifecycle name.

{cnames}

The allowed cabinets associated with the lifecycle.

{cname}

The name of the cabinet the document will go into, or is a part of. Note, this can be set in during the lifecycle.

{dcncs}

This is the connection string for the DocuNECT database.

 

 

Automatic Document Indexing


The following table details the system variables related to the automated classification and indexing rules:

 

Variable Name

Description

Search Result Block Array

This is return by the document indexing functions and has the following elements:

 

Position 0 - Extracted value from the text.

Position 1 - The page number the value was extracted from.

Position 2 - OCR block x position.

Position 3 - OCR block y position.

Position 4 - OCR block width position.

Position 5 - OCR block height position.

{IndexInfoMethod}

Sets the extraction method in the DocInfo. This is used instead of the deprecated IndexInfoSource.

 

Note, if this is not set in DocScript then the default value is: Business Rules

{IndexInfoDescription}

Sets the description in the DocInfo.

 

Note, if this is not set in DocScript then the default value is: Extracted the <Index Name> using Business Rules.

{IndexInfoPercentage}

Sets the percentage confidence in the DocInfo. Note, if not set then the percentage from the indexing rule will be used.

{IndexInfoAccepted}

Sets whether the index is accepted or not. If not accepted then the user will be prompted to change and accept the value in the indexing UI.

{IndexInfoRubberBandBlockPosition}

Sets the location of the rubber band indicate on the document where the value was extracted from.

{IndexInfoRubberBandBlockPosition}

Sets the location of the rubber band indicate on the document where the value was extracted from.

 

 

Document Workflow


The following table details the system variables related to the document workflow:

 

Variable Name

Description

{BusinessRulePassFail}

If writing a system level task and deciding a conditional branch in DocScript, then you can use this variable. This is a boolean variable.

 

1 = Success

0 = Failure

{AssignNextTaskToUser}

Allows a user to be assigned to a task via DocScript.
 

Example:

 

 

{AssignNextTaskToUser} = 'bbolton'

 

{AssignNextTaskToRole}

Allows a role to be assigned to a task via DocScript.
 

Example:

 

 

{AssignNextTaskToRole} = 'Finance Review'

 

{AdditionalComment}

Add comments via DocScript to describe automated processing.

{FullName}

Used in the task email tab only and will replace the user's full name into the message.

{TaskLink}

Used in the task email tab only and will replace the link to the task into the message.

{<Index Name>}

Used in the task email tab only and will replace with the associated document index value.

 

 

 

 

 

Copyright © 2024 Portford Solutions Group, Inc.