Map
The Map transform has highly versatile applications that are used at field level.
The Map transform supports VBScript, so it is possible to apply a formula to individual fields in this transform. If Script Evaluation is enabled, the result of the formula will become the value of the field.
In addition to formula evaluation, the Map Transform can also:
- Add New Fields to a Transaction type.
- Reorder Fields within a Transaction type.
- Translate Field Names & Types: each Field can be renamed and its Type altered.
Order of Execution
There are two relevant Orders of Execution for the Map transform.
- Child record's formulae are processed before their parent’s, as per the Data Processing Pattern.
- At field level, the Map transform executes formulae in order from first to last. It may be necessary to reorder the fields to control the sequence of formula execution.
Options Tab
Log Intermediate Script Results
When selected, each field's evaluation steps are recorded to a file.
This is helpful when there are script errors which cannot be identified or debugged normally.
The evaluation of each field generates three separate lines within the log:
- Pre-resolution – The formula before field substitutions.
- Post-Resolution – The formula, with the substitutions replaced with the field values.
- Post-Evaluation – The result of the formula.
The log file is named “evaluation.log” and is located in the IManDebug directory.
Map > Field Mapping
Use the Transaction Id drop-down to select the transaction to be edited.
Edit Row
To edit one of the fields, highlight the field to be edited and either press the edit button at the bottom of the grid or double-click the field on the grid.
New Fields are added by double-clicking the blank row at the top of the first page of the grid.
Move Field Buttons
To control the sequence that fields are evaluated, move the fields up and down by using up and down arrow buttons at the bottom of the grid.
Delete Field
To delete a field from the transform, highlight it, then press Delete button at the bottom of the grid.
Only fields added in the transform can be deleted. The fields which are inputs from the parent transform are fixed and may not be deleted.
Map > Field Mapping > Edit
Current Field Name
This is the field name before transformation. For new fields added in the transform this is blank.
New Field Name
The name given to the field after transformation.
Field Type
The data type of the field.
In the Map transform the field type is important, as it controls how the result of the VBScript formulas are entered in the fields.
Incorrect setting of field types may result in incorrect formula results, or formula failures.
Enable Script Evaluation
If selected, the Field Value/Script Formula field is evaluated. If the field can be successfully evaluated the result of the formula is assigned to the field.
If the field cannot be evaluated because of an error, an exception is generated and logged to the Audit Report. Then, depending on the Transform Error Action instruction, the transform may reject record or abort.
If unselected, the Field Value/Script Formula field is treated as a literal and is set to the field.
Field Value/Script Formula
The formula (or literal word) to set to the field. If left blank, the record field will be left empty.
Check Button
Press the check button to ensure the formula is valid.
Syntax Check Result
To the right of the Check Button are the results of the syntax check.
Map > Audit
Supported Counters
- PROCESSED
- Incremented for each record processed.
- ERRORS
- Incremented for each non-handled error on a formula.
Action on Transform Error
It is highly recommended this is set to Abort. Setting to Reject Record or Continue will allow IMan to continue processing irrespective of an error AND may cause records to be erroneously mapped to the dataset.