engine:import:addtranslation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
engine:import:addtranslation [2018/08/14 22:04] – [Syntax] dcumming | engine:import:addtranslation [2025/01/21 22:07] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | addtranslation | + | ====== AddTranslation |
- | + | ||
- | ==== AddTranslation ==== | + | |
Translate the value of a field based upon the current value of the field. | Translate the value of a field based upon the current value of the field. | ||
- | ==== Phase ==== | + | ===== Phase ===== |
This instruction is used by the TapeTrack Import Engine. | This instruction is used by the TapeTrack Import Engine. | ||
- | ==== Syntax ==== | + | ===== Syntax |
- | **AddTranslation**//(field, filter, translation); | + | |
- | // | + | '' |
- | // | + | |
- | // | + | ^ Variable ^ Type ^ Description ^ Min Length ^ Max Length ^ |
+ | |field| String | The field to be translated.| 1|128| | ||
+ | |filter| String | A filter to compare against the current field value.|1|256| | ||
+ | |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.|1|256| | ||
< | < | ||
Line 19: | Line 20: | ||
record.</ | record.</ | ||
< | < | ||
- | Although an AddTranslation2 is functionally equivalent to a AddTranslation with the same | + | Although an [[engine: |
- | field and field2 values, AddTranslation entries are processed first, and then AddTranslation2 | + | field and field2 values, AddTranslation entries are processed first, and then [[engine: |
entries are processed a 2nd time. This allows you to translate the value of the field2 | 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 | comparison field first, and then translate the value of the field based upon the translated value | ||
of field2.</ | of field2.</ | ||
- | To substitute the current field into the string use an asterisk (" | + | < |
To substitute part of the current field into the string use a combination of tildes (" | To substitute part of the current field into the string use a combination of tildes (" | ||
carets (" | carets (" | ||
- | to drop. | + | to drop.</ |
- | field The field to be translated. | + | |
- | filter A filter to compare against the current field value. | + | |
- | translation The new value of the field. This can either be a new literal value, or the original value | + | |
- | with a prefix or suffix. | + | ===== Example ===== |
- | Examples | + | Append L3 to each VOLUME field if the value starts with a zero. |
- | Example A.23. AddTranslation: | + | < |
- | starts with a zero. | + | |
- | AddTranslation(VOLUME, | + | Truncate a VOLUME field to 6 characters when the Volume-ID starts with an A. |
- | 70 | + | |
- | Example A.24. AddTranslation: | + | < |
- | the Volume-ID starts with an A. | + | |
AddTranslation(VOLUME, | AddTranslation(VOLUME, | ||
+ | </ | ||
+ | |||
+ | |||
+ | Remove the first 3 characters from a [[object: | ||
+ | |||
+ | < | ||
+ | AddTranslation(VOLUME, | ||
+ | </ | ||
+ | |||
+ | ===== See Also ===== | ||
+ | |||
+ | [[engine: | ||
+ | [[cli: | ||
+ | [[cli: | ||
+ | |||
+ | {{tag> import_engine sync_engine}} |
engine/import/addtranslation.1534284244.txt.gz · Last modified: 2025/01/21 22:07 (external edit)