B2B Integration : Trading Networks Administrator's Guide : Creating Flat File Document Types : Creating a Flat File Document Type : Specifying Attributes to Extract : Transforming Extracted Attributes : Built-In Transformations for STRING or STRING LIST Data Type Attributes
Built-In Transformations for STRING or STRING LIST Data Type Attributes
If you extract an attribute that has the data type STRING or STRINGLIST, you can transform the string value using one of the built-in transformations below.
Format
Description
Uppercase
Transforms the extracted string attribute value to all uppercase.
Lowercase
Transforms the extracted string attribute to all lowercase.
String Substitution
Substitutes extracted values with a pattern you specify. Trading Networks uses the java.text.MessageFormat class to perform this transformation.
Suppose your gateway service extracts the names of three items in a purchase order and places them in an attribute named itemName in TN_parms as follows:
/TN_parms/itemName = {"WidgetA", "WidgetB", "WidgetC"}
Your document type would have to include the following:
itemName STRING LIST
Suppose you want to replace the three names with a single string that contains the three names. Use this field to specify the following string substitution pattern:
"Item Name: {0}, {1}, {2}"
Trading Networks would store the following for the value of itemName:
Item Name: WidgetA, WidgetB, WidgetC
If you place more arguments in the pattern than there are extracted values, the string stored in the database for the attribute will contain the extra arguments. If you specify fewer arguments than there are extracted values, the string will contain only the values for the number of arguments.
Copyright © 2016- 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback