Customization of conversion through scripting delivers a virtually unlimited flexibility (See scripting.) Right click on a field in the output dictionary and follow the context menu down to select "Create Script Conversion" item, the OnRecord context method will be inserted with a line of code for the corresponding field customization: '----------------- OnRecord -----------------
Function OnRecord DictOut.Price10.value = Empty End Function
We have discussed how scripting can facilitate record delimiter and field delimiter related tasks in Step 2 and Step 3 respectively. Here we will talk about customized data transformation and output record filtering. 1. Customized data transformation can be very handy when your output field value should be a function of multiple input fields: DictOut.FullName.value = DictInt.FirstName.value & " " & DictInt.LastName.value
DictOut.Field1.value = Left( DictInt.Field1.value, 3 ) & "_" & Right( DictInt.Field1.value, 3 )
2. Output record filtering is needed when your input data consists of multi level information or if it contains junk data. Scripting allows the disposal of unneeded records. Consider the following input sample: 872375762 VALVE GUIDE 10.25 8
82.00 19980523 19980723 Let's say we do not want to place the subtotal level information into the output database table. The script accomplishing the task would be: Function OnRecord Now we can proceed to Step 8 - Set the output database table. (or go back to Step 6. Edit field map.) |