Viewing the completion script – Kofax INDICIUS 6.0 User Manual

Page 96

Advertising
background image

Chapter 6

90

Getting Started Guide (Fixed-Form)

In this tutorial, a script is attached to the “Start of Document” hook to prepare the
tabular data for display (removing blank rows, retrieving item descriptions, setting
color coding etc) and to transform the date fields on the example documents into a
consistent “MMDDYYYY” format before display. The transformation is implemented
in a script function “Start_Of_Document” in the script file “Order Form.ifv”. In
general, any data manipulation scripts should be attached to global hooks, whereas
field specific hooks should be used to annotate the image in a particular way for a
field, to display help for a field and to validate the data in a field.

X

To assign the script to the template

1

In the bottom right of the Template Editor view, click Hooks to display the
Script Hooks panel.

This shows all the fields and any validation or data transformation scripts
assigned to them.

2

Select the line for the Global Start of Document hook.

3

Click the button in the File column.

4

Select “Order Form.ifv.”

5

Click the button in the Function column.

6

Select the function “Start_Of_Document.”

7

Save the template file.

X

To test the template

1

Select Tools | Test Template… or press F8 to start Completion with the
current image and template.

2

Move from field to field by pressing tab, checking that the validation rules
are correct (for example input different valid and invalid credit card
numbers, then try the one on the image). Also check that the correct View
Area is displayed for each field and the Focus Area is correctly positioned.

Note

During testing, data is not automatically entered in the template (from

Recognition and Correction) and the table will by default have one row.

Viewing the Completion Script

The script used for validation and data transformation can be viewed in Script
Editor, a tool which can be used to generate scripts for all the modules.

Advertising