StringConcatenator
Concatenates the values of any number of attributes, user parameters and/or constants, and stores the result in a new attribute.
Note: If you require setting more than one attribute, consider using the AttributeCreator. It contains the same functionality.
Input Ports
This transformer accepts any feature.
Output Ports
Features with the concatenated attributes.
Parameters
Choose Create New Attribute to evaluate the specified expression and have the calculated results put in the specified attribute.
Choose Overwrite Existing Attributes to evaluate the specified expression once per selected attribute. The result of the evaluation will be put back into the attribute.
This is the attribute that will contain the result. Use the default name, or type a new name.
This parameter allows the same expression to be evaluated, once per selected attribute. For each attribute specified, the result of the expression will be stored into that attribute.
If the concatenation needs the value of the current attribute, retrieve it using the function @CurrentAttribute(). For example, if the incoming feature has attributes X and Y, and we wish to prefix them with string prefix_, select both attributes, and set the expression to prefix_@CurrentAttribute().
Defines the items to be concatenated. For each item, you can select either an attribute value, constant, newline, published parameter, private parameter, or FME parameter. A preview of the resulting string is shown in the Concatenated Result window.
For example, you want to combine park name and area attributes into a single label that might look like this for a particular park:
Park: Strathcona Park
Area: 87308 sq ft
Under String Parts, select the attributes to concatenate, and constants and a New Line to complete the label:
To switch to a more advanced text editor, click the Switch to Advanced button.
In this editor, you can compose a string in the String Expression section. The string can contain attribute value references, function references, or user parameter references.
Note: To use Math functions in the text editor, you also need to use the feature function @Evaluate. For example, this expression multiplies the area of a feature by the value of an attribute, and creates a string that reports the result: @Evaluate(@Round(@Value(NumericAttribute))*@Area())
Note: You can switch back to basic mode using the Switch to Basic option on the Options menu; however, some table formatting may be lost when going from Advanced to Basic.
Related Transformers
ExpressionEvaluator: Calculates numeric expressions, which can be embedded within string expressions. Note that in string expressions, leading and trailing white spaces are preserved, whereas in a numeric context, such as within ExpressionEvaluator, leading and trailing white spaces are ignored.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Transformer Categories
Transformer History
This transformer was previously called the Concatenator.
Search FME Community
Search for samples and information about this transformer on the FME Community.
Keywords: Concatenator join connect series