IsNewRecord()



Description

IsNewRecord is called for each new line of the input text. An implementation of this method is needed to handle an irregular record delimiter. For example, a record number is a designated record delimiter and several input text lines belong to a single input record. You can use the record delimiter option for a non-constant delimiter like this, but you can easily solve this issue by implementing the IsNewRecord method.


Syntax


Function IsNewRecord( text_line )


Parameters


string text_line - a line of the input text, which should be analyzed to make a decision if a new record begins with this line


Return value


boolean true|false
return true to indicate that the line is a beginning of a new record; otherwise, return false .


Example

This sample illustrates how to handle a non-constant record delimiter (record number).

Function IsNewRecord( text_line )
Dim words
words = target.SplitString( text_line )
If IsArray( words ) And IsNumeric( words(0) ) Then IsNewRecord = true Else IsNewRecord = false
End Function


See also

TextConverter's Context Methods
OnRecord()
OnStartProcess()
OnSetUp()