Kofax Getting Started with Ascent Xtrata Pro User Manual

Page 135

Advertising
background image

Chapter 4

116

Ascent Xtrata Pro User's Guide

Figure 4-7. Script Formatter –Script Code Dialog Box

11

In the script, you can also reuse existing formatters. The sample below shows

script code that takes the result of the Amount Formatter (AmountFormat)
and adds an “€” sign at the end of the formatted output text. The Amount
Formatter is set up so that only two decimal places after the decimal symbol
are used.

Private Sub

ScriptFormat_FormatField(

ByVal

FieldText

As String

,_

FormattedText

As String

, _

ErrDescription

As String

, _

ValidFormat

As Boolean

)

Dim

valid

As Boolean

valid = AmountFormat.FormatField (FieldText, _
FormattedText,

_

ErrDescription)

FormattedText = FormattedText + " €"

ValidFormat = valid

End Sub

12

Close the Script Code dialog box and test the implementation from the

Testing panel of the Script Formatting Properties dialog box. For more
information, see Project Builder User Interface - Script Formatting Properties
Dialog Box.

X

To assign a formatter to a simple or table field

1

Select Show Extraction Design from the Mode toolbar.

2

Select a field from the list and open its properties dialog box.

Advertising