2.1 TagSearch

Highlights

- An appropriate record delimiter selection.
- OnRecord context method implementation.
- Handle tagged field values using the GetValueByTag function.

location:  InstallDir/Samples/TextConverter/2 Irregular field and record delimiters/

project file:  InstallDir/Samples/TextConverter/2 Irregular field and record delimiters/2.1 TagSearch.ConverterX


Open the "2.1 TagSearch.ConverterX" project file by pressing the Open tool bar () or by selecting "Open Project" from the "File" menu.

The original input file has multiple lines per record.

After the input file was loaded, a list of the most suitable record delimiters was populated for the record delimiter option. We have chosen "@" from the list as a record delimiter, which formed correct input records. All fields in the input record do not have an evident field delimiter, but are prepended with a tag such as "Author", "Title", etc. TextConverter allows to easily handle such cases through use of the GetValueByTag method. After the output dictionary is set up, you can drag output fields into the script editor's area and customize each output value:

DictOut.Author.value = this.GetValueByTag( "Author=" )

Each change in the script is immediatly reflected in the output preview, which makes it easy to create custom conversions quickly and without errors.

Select the output database table and click Run () to start the conversion.

Go to Sample 2.2 for more training.

Sample 2.1



Go to 2.2 Quickbooks for more training.


Related Sections

TextConverter's Concept

Setting up a Conversion: Step-by-Step

Samples and Walkthroughs

User Interface

Scripting

Comments