2.2 Quickbooks


- Widely accepted data format used by QuickBooks and MS Money.
- An appropriate record delimiter selection.
- OnRecord context method implementation.
- Handle tagged field values with the GetValueByTag function.
- Filter out unneeded records with the SkipRecord function.

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

project file:  InstallDir/Samples/TextConverter/2 Irregular field and record delimiters/2.2 QuickBooks.ConverterX

Open the"2.2 QuickBooks.ConverterX" project file by pressing the Open button on the tool bar () or by selecting "Open Project" from the "File" menu.

The information for a single input record spans several lines of the input text:


After the input file is loaded, a list of the most suitable record delimiters was populated for the record delimiter option.

1. Select "<STMTTRN>" as a record delimiter.
2. Make a decision as to what data you'd like to have in the output.
3. Modify the output dictionary accordingly.
4. Implement the OnRecord context method.
5. Drag the output fields into the script editor area and customize each output value, using GetValueByTag method.
6. Use the SkipRecord method to filter out unneeded output records.

'----------------- OnRecord -----------------
Function OnRecord
Dim dt
dt = this.GetValueByTag("<DTPOSTED>")
If Target.IsEmpty(dt) Then this.SkipRecord: Exit Function
DictOut.DTPOSTED.value     = Target.InitDate( Left(dt, 8), "YYYYMMDD" )
DictOut.NAME.value         = this.GetValueByTag("<NAME>")
DictOut.TRANAMT.value     = this.GetValueByTag("<TRNAMT>")
End Function

Each change in the script is immediately 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.3 for more training.

Sample 2.2

(Go back to 2.1 TagSearch)
Go to 2.3 Dictionary for more training.

Related Sections

TextConverter's Concept

Setting up a Conversion: Step-by-Step

Samples and Walkthroughs

User Interface