Replace Each String
Logic name
Replace Each String (Document Mapper/Variable Mapper/Merge Mapper)
Function
This logic replaces the input string based on a replacement table and returns the value of the string.
Data types
|
Location |
Type |
|---|---|
|
Input handler |
String |
|
Logic output |
String |
Refer to the following for details:
-
Logic specifications (Document Mapper/Variable Mapper)
-
Logic specifications (Merge Mapper)
Properties
|
Category |
Property |
Description |
|---|---|---|
|
Required settings |
Replacement table |
Replaces the input value based on a replacement table and returns the result. The input with no matching value is returned without conversion. |
|
Required settings |
Matching method |
Specify the matching method. |
|
Required settings |
Replacing method |
Specify the replacing method. |
|
Additional string |
Prefix |
Specify a string to add before the replacement string. |
|
Additional string |
Suffix |
Specify a string to add after the replacement string. |
|
Comment |
Comment |
You can write a description of the logic. It doesn't affect the conversion process. |
Matching method
|
Option |
Description |
|---|---|
|
Exact match |
Replaces when the value of the input handler matches the value of Replace from of Replacement table exactly. |
|
Partial match |
Replaces when the value of the input handler partially matches the value of Replace from of Replacement table. |
Replacing method
|
Option |
Description |
|---|---|
|
Complete replacement |
Replaces the value of the input handler with the value of Replace to of Replacement table. |
|
Partial replacement |
Replaces the matching part of the input handler with the value of Replace to of Replacement table. |
Specification limits
-
Only the first matching string will be replaced when the input value contains multiple strings witch match the value of Replace from.
-
The following characters can't be used for Replace fromand Replace to.
-
"("
-
")"
-
Logic sample
Mapping definition
Logic settings and processing result (exact match)
This logic replaces the notations of weeks using the replacement table.
Property settings
|
Property |
Setting |
||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Replacement table |
|
||||||||||||||||
|
Matching method |
Exact match |
||||||||||||||||
|
Replacing method |
Complete replacement |
Input data
|
Sunday |
|
Monday |
|
Tuesday |
|
Wednesday |
|
Thursday |
|
Friday |
|
Saturday |
Output data
|
Sun. |
|
Mon. |
|
Tue. |
|
Wed. |
|
Thu. |
|
Fri. |
|
Sat. |
Logic settings and processing result (partial match)
This logic replaces the notations of weeks using the replacement table.
Property settings
|
Property |
Setting |
||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Replacement table |
|
||||||||||||||||
|
Matching method |
Partial match |
||||||||||||||||
|
Replacing method |
Partial replacement |
Input data
|
3/20 (Sunday) |
|
3/21 (Monday) |
|
3/22 (Tuesday) |
|
3/23 (Wednesday) |
|
3/24 (Thursday) |
|
3/24 (Friday) |
|
3/25 (Saturday) |
Output data
|
3/20 (Sun) |
|
3/21 (Mon) |
|
3/22 (Tue) |
|
3/23 (Wed) |
|
3/24 (Thu) |
|
3/24 (Fri) |
|
3/25 (Sat) |
For a list of logics, refer to Mapper Logic Guide.