1.877.833.1202

Auto-filing templates

Auto-filing can take documents from the FDA Inbox, Manage Imports, Automatic document importation, Print to FileHold, the Microsoft Office integration, the Add Document Wizard, and WebCap scanner inbox and file them into the appropriate folders based on predefined values. This feature helps reduce misfiling and enables faster mass importation of documents.

Library administers or higher roles can apply auto-filing to document schemas by configuring auto-filing templates. Configuring auto-filing templates may require some technical knowledge about regular expressions and merge tags, depending on how complicated the script needs to be. The FileHold Professional Services team can assist with creating auto-filing templates.

When creating the templates, the library objects (cabinet, drawer, folder group, and folder) need to be defined. Structure can be automatically created or not. If creating structure, a “template” can be selected from the current structure which is used to copy the ownership, membership or default schema, unless otherwise specified.

The templates are validated for correctness. The validation errors must be corrected before the template can be saved. The rules for template validation are:

  • Name cannot be empty.
  • There must be at least one condition in each section.
  • Folder must be set if template can create library objects.

The rules for library object validation are:

  • Name cannot be empty.
  • Search and match must be set or both should be null.
  • Match must be a valid regular expression.
  • [[md]] or [[sys]] merge tags used in search and name must be valid.

For other auto-filing options, see Auto-filing Settings.

To create an auto-filing template

  1. Go to the Administration panel > Library configuration > Auto-filing templates.
  2. Click Add.
  3. In the General tab, enter a Template name for the template.
  4. Enter a Description for the template.
  5. In the Schemas where used area, the schema names that use this template are listed. This field cannot be modified and is blank when creating a new template.
  6. Click Next.
  7. The Summary tab displays a summary of the library object definition. This is blank until the properties are defined. To define or edit a library level, click Edit Edit icon or select the Cabinet, Drawer, Folder Group or Folder tab.
  • If the library definition is created and validated, examples of what the library structure will be is shown. The test values can be modified in the Test values tab.

  1. Click Next.
  2. In the Library properties tab, enable the Auto-filing can create library objects check box if the template can create library structure: cabinets, drawers and folders. If the check box is disabled, then new library structure cannot be created by the auto-filing script.
  • In the Library properties template field, select a folder from the current library structure to base membership, ownership, colour, and other properties from for the newly created structure. This option is only enabled if the Auto-filing can create library objects check box is enabled. Click Apply.

If folder properties from which the template is based upon changes, this also updates the auto-filing script for any new documents added. For example, a different owner or folder colour changes.

  • Select the Set folder owner to current user check box if the newly created folder structure should have the current user as the owner of the folder.
  • Select the Set default schema to current schema check box if the default schema for the newly created folder structure should be the same as the schema being used to create the folder.
  1. Click Next.
  2. In the Cabinet, Drawer, Folder Group, or Folder tab, click Add Add button to define the library object settings. Many conditions can be defined per library object.
  3. Enter the following library object auto-filing settings and click Update. If creating a folder group, enable the Include folder group check box.

Field

Description

Cabinet name

Drawer name

Folder group name

Folder name

This field is required. Do one of the following:

  • Enter text for the library structure (cabinet, drawer, folder group, folder) name.
  • Use a merge tag to define the name. This can be a system or metadata field value. See Merge Tags for a complete list of merge tags.
  • Use the “replace” merge tag in conjunction with the Search and Match conditional settings to create the library structure name. See Using the “replace” merge tag with auto-filing templates.

For examples see Auto-filing template examples.

Description

Enter a description for the setting. This field is required.

Search

This field is used to define what value to search on and is used with the Match field. This field is optional.

Do one of the following:

  • Enter the text to search
  • Enter a merge tag

For example, search the metadata field “Vendor”:

[[md|Vendor]]

Match

This field is a valid regular expression. It is used in conjunction with the Search field and must match the Search field. This field is optional.

For example, match the vendor name “FileHold”:

^(?:(FileHold)).*$

 

  1.  Click Next.
  2.  In the Test Values tab, sample values to validate the configuration are shown. Each field is treated as a text field. Enter your own values to validate with in the fields. These values persist along with the rest of the auto-filing configuration. If a merge tag field is removed from a name, its corresponding test value is erased. In cases where the match is used, there is a test value representing each match case. Each value has an arbitrary default value from the following list:
  • Text: "Text field"
  • Dropdown menu: First option in the list.
  • Multi-select dropdown menu: First two options in the list.
  • Drilldown menu: First child node in the tree along with its parents and separator as appropriate according to the configuration.
  • Currency: 123.45
  • Numeric: 987.65
  • Checkbox: True
  • URL: http://www.example.com
  • Any date: Today's date and time.
  • Any user related field: Current user.
  • Document control number: The DCN prefix followed by the last DCN, or if there is no document yet created the next DCN, or if no starting value simply the number 1 with the appropriate leading zeros.
  • Version control number: VER1
  • FileHold id: Next document id.
  • Document version: 1
  • Document name: My document name
  • Workflow template: My workflow template
  • Workflow name: My workflow name
  • Schema name: My schema name
  1. At any point in the auto-filing template configuration, click Validate. The configuration is validated and displays the message “Validation completed without errors” on the Summary tab.
  • If there are errors, the message “Some validation errors were found. Please, correct them and try again” displays. The configuration settings require modification if this message appears.
  1. Click Save to save the auto-filing template.
  2. Click Close Close button to close the template.
  3. Ensure that auto-filing is enabled for the system.
  4. Apply the auto-filing template to the document schema.
  5. Test the auto-filing script by adding a document using one of the following methods: FDA Inbox, Manage Imports, Automatic document importation, Print to FileHold, the Microsoft Office integration, the Add Document Wizard, or WebCap scanner inbox.
  6. Make any modifications to the auto-filing script as needed.

Using the “replace” merge tag with auto-filing templates

The “replace” merge tag can be used in the Cabinet/Drawer/Folder Group/ Folder Name field in more advanced auto-filing templates. It is used in conjunction with the Search and Match fields in the library object definition. It allows for the replacement of a value when the search and match conditions are met. At this time, the replace tag can only be used with auto-filing. Knowledge of merge tags and regular expressions are required to use the replace merge tag. For examples of using the replace tag, see Using the Search, Match fields and “replace” merge tag.

How to manipulate the auto-filing template view

The auto-filing template list can be modified to add or remove columns, resize or change the order of the columns, sort ascending or descending, filter the results, and save these different views. See How to manipulate the watermark template view for more information.

Exporting the auto-filing templates list

The auto-filing template list can be exported out to a PDF, Excel, or CSV file. See Exporting the watermark templates list for more information.

Auto-filing template examples

Below are some auto-filing template examples from simple to advanced cases. For all examples, on the Name and Description are required fields.

1. Simple auto-filing template

A simple example of an auto-filing template is:

  • A cabinet “Accounting”.
  • A drawer “AP Invoices”.
  • A folder “All invoices".

For the cabinet, drawer, and folder settings in the auto-filing template, only a Name and Description is required to set the document location. The Search and Match fields are left blank.

Auto-filing template example 1

Here is the Summary page for the configuration:

Auto-filing folder summary

2. Auto-filing template using merge tags

Merge tags can be used to set the cabinet, drawer, folder group, and folder location. A list of all merge tags can be found here.

In this example:

  • Cabinet is “Accounting”.
  • Drawer is “AP Invoices”. The merge tag [[sys|document-schema]] is used in the Name field.
  • Folder group is the invoice year. The merge tag [[md|Invoice Date|yyyy]] is used in the Name field.
  • Folder is the vendor name. The merge tag [[md|Vendor]] is used in the Name field.

Auto-filing merge tag example 1

Here is the Summary page for the configuration:

Library object definition using merge tags

When a document is added via the FDA inbox, the destination folder is set to “Accounting/AP Invoices/2019/BC Hydro” based on the document schema and metadata.

Auto-filing FDA Inbox

 

3. Using the Search, Match, and merge tag fields

Merge tags can be used in conjunction with the Search and Match fields to create library structure when certain conditions are met. In this case, the HR department manages employees all over North America and want to add their employee information files into the FileHold library. They want their folders to be based on the “Province/State” metadata field value and preceded with the country prefix “CAN-“ or “USA-“.

For the first folder condition, it is matching on the short State code:

  • Name: USA-[[md|State/Province]]
  • Description – USA folders
  • Search: [[md|State/Province]]
  • Match: ^(?:(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])).*$

For the second folder condition, it is matching on the short Province or Territory code:

  • Name: CAN-[[md|State/Province]]
  • Description: Canadian folders
  • Search: [[md|State/Province]]
  • Match: ^(?:(AB|BC|MB|N[BLTSU]|NFL|NWT|ON|PEI|QC|SK|YT)).*$

Auto-filing template folder conditions

Depending on the selection made in the State/Province drop-down metadata field, the folder is created based on the condition rules. In the example below, the province “BC” was selected from the State/Province metadata field so the folder name is “CAN-BC”.

Auto-filing according to country and state/province

4. Using the Search, Match fields and “replace” merge tag

The “replace” merge tag can be used to replace the value matched in the Match and Search fields with some other value.

In this example, accident and health insurance (A&H) policies are being added to the FileHold library.

  1. For the cabinet, the name is Accident and Health Insurance (A&H).
  2. For the drawer, the name should be restricted to the City and Province of the policy. The city name is prefixed with the province abbreviation.
  • For condition 1:
  • Name: [[replace|BC-${city}|Error in BC address]]
  • Description: BC cities
  • Search: [[md|Policy location]]
  • Match: ^(?<city>\w*), BC$
  • For condition 2:
  • Name: [[replace|AB-${city}|Error in AB address]]
  • Description: AB cities
  • Search: [[md|Policy location]]
  • Match: ^(?<city>\w*), AB$
  • For condition 3:
  • Name: [[replace|ON-${city}|Error in ON address]]
  • Description: ON cities
  • Search: [[md|Policy location]]
  • Match: ^(?<city>\w*), ON$
  1. For the folder groups, the name should be restricted to the first five digits of a nine-digit Policy Number. A “GR” precedes the number.
  • Name: [[replace|GR-${1}]]
  • Description: First 5 digits of 9-digit policy number
  • Search: [[md|Policy No.]]
  • Match: ^(\d{5})\d{4}$
  1. For the folders, the Last Name of the Policy Holder and name of the Dependent are combined.
  • Name: [[md|Last Name]]-[[md|Dependent name]]

Test values for auto-filing template

Summary tab - auto-filing template

For assistance with auto-filing templates, contact the FileHold professional services team at [email protected].