Number of input and output field
| Number of input field |
: |
One |
| Number of output field |
: |
One |
This transformation function is used to replace the content of a text field based on a file reference.
The parameters of this transformation function are:
- File Reference
The path to the reference file used for replacement.
- Field Splitter
The character used to split each line in the reference file into an array of strings.
- Target Index
The index of the resulting array whose content will be compared against the incoming data.
- Replacement Index
The index of the resulting array whose content will be used to replace the incoming data.
- Number of Target
Indicates the maximum number of replacements to perform.
- Target Position
Specifies where the text to be replaced can appear (Start of Text, End of Text, or Any Position).
- Replacement Method
Specifies whether to replace the First Occurrence or All Occurrences.
Example
Incoming Data
A A HANIF A A
A. A. GD. AFIF
Content of reference file (for example name.txt) :
A A |ANAK AGUNG
A A B |ANAK AGUNG BAGUS
A A NGR |ANAK AGUNG NGURAH
A A SG |ANAK AGUNG SAGUNG
A, A, |ANAK AGUNG
A. A |ANAK AGUNG
A. A .GDE |ANAK AGUNG GEDE
A. A. |ANAK AGUNG
A. A. B |ANAK AGUNG BAGUS
A. A. B. |ANAK AGUNG BAGUS
A. A. GD. |ANAK AGUNG GEDE
Function Parameter
- File Reference = name.txt
- Field Splitter = |
- Target Index = 0
- Replacement Index = 1
- Number of Target = 1
- Target Position = Any
- Replacement Method = First Occurrence
Output of Function:
ANAK AGUNG HANIF A A
ANAK AGUNG GEDE AFIF