TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


engine:import:addtranslation2

AddTranslation2

Translate the value of a field based upon the value of another field.

Phase

This instruction is used by the TapeTrack Import Engine.

Syntax

AddTranslation2(field, field2, filter, translation);

Variable Type Description Min Length Max Length
field String The field to be translated.1128
field2 String The field to be compared using the filter.1128
filter String A filter to compare against the current field value.1256
translation String The new value of the field. This can either be a new literal value, or the original value with a prefix or suffix. To represent the current value use an asterisk (“*”).1256
All AddTranslation instructions add to the translation table which is processed in the sequence in which the AddTranslations are coded in the definition file. Once a translation match is found for the target field no further translations will occur for that field within that record.
Although an AddTranslation2 is functionally equivalent to a AddTranslation with the same field and field2 values, AddTranslation entries are processed first, and then AddTranslation2 entries are processed a 2nd time. This allows you to translate the value of the field2 comparison field first, and then translate the value of the field based upon the translated value of field2.

Example

Append L3 to each VOLUME field value of USER1 is HCART3.

AddTranslation2(VOLUME, USER1, "HCART3", "*L3");

See Also

engine/import/addtranslation2.txt · Last modified: 2021/07/22 02:40 by scunliffe