Background

Complex documents often contain language that cannot readily be built with standard Microsoft Word capabilities.  Aspen Workflow provides a mechanism for including the output of Visual Basic scripting functions as merge fields in a document.  This capability is referred to as "functions".

Capabilities

Literally anything text that can be programmatically generated with a scripting language can be made available as a merge field.  For example, a function can easily be constructed to string together text from any number of mortgage assignment tasks, creating a chain of mortgage assignment field capable of handling an unlimited number of assignments.

From a more esoteric standpoint, functions could be used to retrieve a credit report via the Internet, and insert the results of the report into the middle of a document.  Practically speaking, as XML is widely deployed, the number of useful functions built on such technology will grow exponentially.

Steps

To use a function in a document, the following steps must be completed:

  1. Add the Function:  from Admin - Functions, insert a new function.  It is recommended that the function name contain no spaces.  For example, add a function called HelloWorld.
  2. Create the script for the function manually or using the Function Wizard.  This script must be saved in the Code field of the function.  Create a valid VB script function such as:
helloWorld = "Hello World!  This is my first function"
  1. Include the function in the document:  from Admin - Documents - Fields, click on the Add a Function icon, and add the newly created HelloWorld function to the document.

Examples