You are here: Lists > ListRenamer

ListRenamer

Renames or promotes list names or components. When promoting or renaming, if the resulting name collides with an existing attribute name, the existing attribute will be overwritten.

For the discussion below the following terms are introduced:

  • Component – This is a piece of an attribute name. For example, in list{}.blat{}.foo, there are 3 components. Two components are lists: list{} and blat{}. One component is not a list: foo.
  • Subcomponent – This is a component of a list. Thus, in list{}.blat{}.foo, blat{} is a subcomponent of list{}. Similarly, foo is a subcomponent of blat{}.
  • Structured List – a list for which a subcomponent contains more than one piece of data. The elements of the structure are represented as foo{}.a or foo{}.b.

Parameters

Examples

Example 1

If the List to Process is somelist{} and the incoming feature contains:

somelist{0}.length = 7.3

somelist{2}.length = 5

somelist{3}.height = 6

If somelist{} is renamed to anotherName{}, the result will be:

anotherName{0}.length = 7.3

anotherName{2}.length = 5

anotherName{3}.height = 6

Example 2

If the List to Process is somelist{}.listTwo{}, the List Action is Promote – listTwo{1}, and the incoming feature contains:

somelist{0}.listTwo{0} = 0

somelist{0}.listTwo{1} = 1

somelist{0}.listTwo{3} = 2

Then the result will be:

somelist{0}.listTwo = 1

Example 3

If the List to Process is somelist{}.listTwo{}, the List Action is Promote – listTwo{1} and the incoming feature contains:

somelist{0}.listTwo{0}.length = 0

somelist{0}.listTwo{1}.length = 1

somelist{0}.listTwo{1}.height{0} = 3

somelist{0}.listTwo{3}.length = 2

Then the result will be:

somelist{0}.length = 1

somelist{0}.height{0} = 3

Example 4

If the List to Process is somelist{}, the List Action is Promote All Subcomponents and incoming feature contains the following:

somelist{0}.length = 7.3

somelist{2}.length = 5

somelist{3}.height = 6

The result will be:

length{0} = 7.3

length{2} = 5

height{3} = 6

Additional Resources

More Information on Lists

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

Lists

Search FME Knowledge Center

Search for samples and information about this transformer on the FME Knowledge Center.