6.5
© 2007 ABBYY. All rights reserved.
57
Field type Return values
Check mark
group
Type: Variant(vbString)
If the case of multiple selection the property returns “–2”.
If no check mark was selected, the property returns “–1”.
If the first check mark in the group was selected, the property returns “1”.
If the second check mark in the group was selected, the property returns “2”.
...
If the last check mark in the group was selected, the property returns
“number_of_the_last_check_mark_in_the_group".
Any other data are regarded as invalid.
CheckValue property
CheckValue As Variant is a read–only property. It returns the field value.
SetCheckValue method
The Sub SetCheckValue( ByVal Value As String, Optional ByVal ErrorLevel, Optional ByVal Precision, Optional ByVal ErrorFields )
method sets CheckValue for the field as well as the error level for Enterprise check.
Parameters:
• Value specifies the new value for the attribute of the CheckValue field.
• ErrorLevel specifies the error level (see Enum TErrorLevel). The default level is EL_Error.
• Precision specifies the accuracy of the Value number. ABBYY FormReader Enterprise Edition uses it to compare the
attribute values of the
Value and CheckValue fields.
• ErrorFields is the array of the references to error fields. These fields will be shown to the user if an error occurs in the
field. To form this parameter, use the standard VBScript function Array(). If the field for which the SetCheckValue is
called contains an error, the filed will be listed in the error fields list and will be the first item of the list. If the ErrorFields
parameter is omitted, the error fields list will contain only one field for which the SetCheckValue function is called.
Field.Value vs. Field.CheckValue
How do Value and CheckValue differ from each other? The difference is as follows:
ABBYY FormReader Enterprise
Field.Value
read–only
Returns the field value
Field.CheckValue
read–only
Returns the field value to be checked
See the comment to the Field.SetCheckValue() method
Field.SetCheckValue()
Sets the filed value to checked and the error level. When Enterprise checks the form data, this value will be
compared with the filed value recognized (or entered) in ABBYY FormReader (i. e. with the value of the Value
property). In the case of mismatch the error message will be displayed. Comparison accuracy is specified by
using the Precision parameter. The error level is specified by using the ErrorLevel parameter.
If the value of the CheckValue filed is not specified (Empty), check is not performed.
ToDate method
The ToDate( ByVal Optional DateType As TDateFormat, ByRef Optional DateSeparator As String ) converts the string value
of the filed to the Date format by using the specified parameters:
• DateType specifies the date format (sequence of its part); see Enum TDateFormat.
• DateSeparator specifies the date delimiter. It should contain one character, for example, a full stop (“.”).
If the method is called without one or several default parameters, the default parameters specified for the form will be used (see
SetDefaultDateFormat). If the default parameters have not been predefined, a run time error will occur.
If the filed contains incorrect data, the method returns Variant(vbNull).
Note: It is recommended to use this method for converting the field text to the date instead of the standard VB Script method
Cdate, as the standard method uses the system date format, which can vary on different computers.
ToDecimal method
Function ToDecimal( ByRef Optional DecimalSeparator As String ) As Variant
Converts the string filed value to the Currency format by using the specified parameter:
• DecimalSeparator specifies the delimiter (one character only) that will be used for converting the filed text into a
number (Currency).
If the method is called without the default parameters, the decimal delimiter specified for the form will be used (see
SetDefaultDateFormat). If the decimal delimiter has not been predefined, a run time error will occur.
If the filed contains incorrect data, the method returns Variant(vbNull).










