ListConcatenator

From Fmepedia

ListConcatenator is a Workbench Transformer.

Concatenates all the values of a list together into a single attribute.

The separator character can be expressed as one or more characters, or it may be a special character sequence beginning with a backslash ("\"). In that case, it is interpreted as specified in the following table. If the sequence is not listed in the table, then the backslash character is simply ignored.

Sequence     Description
\a           Audible alert (bell) (0x07)
\b           Backspace (0x08)
\f           Form feed (0x0c)
\n           Newline (0x0a)
\r           Carriage return (0x0d)
\t           Tab (0x09)
\v           Vertical tab (0x0b)
\\           Backslash
\,           Comma
\/           Slash
\ooo         The digits ooo describe a character in octal notation. (There may be one, two, or three octal digits.)
\xhh         The digits hh describe a character in hexadecimal notation. (There may be one or two hexadecimal digits.) 

For example, if this feature enters this transformer:

somelist{0}.length             = 7.3
somelist{0}.kind               = ’paved’
somelist{1}.length             = 8.4
somelist{1}.kind               = ’smooth’
somelist{1}.lanes              = 2
somelist{2}.length             = 1.1
somelist{2}.kind               = ’rough’

and a concatenation of somelist{}.kind with a comma (,) separator is requested, then the resulting attribute will contain: paved,smooth,rough.

User Comments Add a new comment