You are here: Working with FME DesktopAbout List AttributesExposing List Attributes

Exposing List Attributes

When a list attribute is created, it consists of a list name, followed by a pair of curly brackets {}, a period character (.), and the attribute name. For example:

mylist{}.myattribute

List elements can have other lists as part of their attributes:

mylist{}.secondlist{}

The empty curly brackets indicate an unqualified list name. That is, there are a number of actual attribute values, or elements, present on the feature. However, it is not possible to directly access values from an unqualified list name. Instead, these names can be used as parameters in the various transformers that operate on lists.

You can expose any number of elements of a list attribute, and from then on access them directly. Such attributes are called qualified list elements. Each list element is just like any other attribute, except it contains an index integer inside the curly brackets as part of its name. For example:

mylist{0}.myattribute

By convention, the first element of a list has an index of 0.

To expose the elements of a list attribute, right-click on one in a reader or transformer, and select Expose Elements.

In the Select List Elements Dialog, enter the index integers of the elements you want to expose. Keep in mind that the first element of a list is always index integer 0.

The exposed elements are added to the attribute list. These qualified list elements are circled below: