Use Libraries

Libraries are a means to create reusable instructions for KCM Designer when Master Templates are executed. While Includes are compiled in Master Templates, Libraries are self-contained, dynamic components.

Libraries contain different kinds of functions and procedures, such as:

  • Formatting functions used to format Fields in Text Blocks.

    You can extend the list of available functions by defining your own format functions in a Library.

  • Filter functions used to filter Text Blocks in Text Block Lists.

The following restrictions apply when removing or renaming Libraries:

  • Library functions cannot be renamed or removed after the Code Library has been unlocked.
  • A Library cannot be renamed or removed if an object refers to one of the functions it contains.
For more information on the reusable functions and procedures that a Library can contain, see the topics on Libraries and exit points in the Kofax Communications Manager Template Scripting Language Developer's Guide.

Create and edit a Library

  1. Navigate to Master Templates > Libraries.
  2. Click Libraries and then click New Library in the New pane on the right.

    The New Library window appears.

  3. Enter a name for the new Library and a level and click OK.

    All Libraries have to be assigned unique level numbers. Level numbers determine the order in which the contents are loaded. Libraries with higher levels have priority over libraries with lower levels. The default level is 100.

    The new Library appears in Libraries.

  4. Click the new Library and then click Edit in the View and Edit pane on the right.

    The Library opens in the Library Editor. If you have Microsoft Word 2016 or later, then a Word-based Library opens in Microsoft Word.

  5. Add or paste the necessary code to the Library.
  6. Save the Library and close the editor.
    If an error occurs, click Show Error Document.