You are here: Attributes > 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,inlist{}.blat{}.foo,there are 3 components.Two components are lists:list{}andblat{}.One component is not a list:foo.
  • Subcomponent – This is a component of a list.Thus,inlist{}.blat{}.foo,blat{}is a subcomponent oflist{}.Similarly,foois a subcomponent ofblat{}.
  • Structured List – a list for which a subcomponent contains more than one piece of data.The elements of the structure are represented asfoo{}.aorfoo{}.b.

Parameters

Examples

Example 1

If theList to Processissomelist{}and the incoming feature contains:

somelist{0}.length = 7.3

somelist{2}.length = 5

somelist{3}.height = 6

Ifsomelist{}is renamed toanotherName{},the result will be:

anotherName{0}.length = 7.3

anotherName{2}.length = 5

anotherName{3}.height = 6

Example 2

If theList to Processissomelist{}.listTwo{},theList ActionisPromote – 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 theList to Processissomelist{}.listTwo{},theList ActionisPromote – 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 theList to Processissomelist{},theList ActionisPromote All Subcomponentsand 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,clickbeside the applicable parameter.For more information,seeTransformer Parameter Menu Options.

Transformer Categories

Attributes

Search FME Knowledge Center

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