Skip to main content
Hi,

 

 

This subject is discussed already quite some times but I don't get it working.

 

I have a loop where a feature enters with 3 fields (field_name, field_value).

 

I want to use the AttributeCreator to make a field that is named after the value in "field_name" and gets the attribute value from "field_value".

 

As there is an option inside the AttributeCreator "Attribute Name from Attribute Value" is supposed this would do the trick. But this does not create a new attribute. If I type the actual field name in the "Attribute Name" field in the transformer it just works fine.

 

 

The attribute names are like this:

 

net_elements{0}.xlink_href

 

net_elements{1}.xlink_href

 

net_elements{2}.xlink_href

 

net_elements{3}.xlink_href

 

...
Are you referring to @Value(@Value(att_name) ?
For some reason the new attribute doesn't show up in the table view of my data inspector but only in the feature information window.

 

So actually it is working perfect.
Hi,

 

 

The attributes which have not been exposed in the workspace will not appear in the Table View. This is the reason. It's the same situation as unexposed format attributes, e.g. "fme_dataset".

 

If you need to display them in the Table View, consider using the AttributeExposer to expose them.

 

 

Takashi

In summary:

You can use an AttributeManager to create an Output Attribute @Value(“field_name") with Attribute Value @Value("field_value”). Like takashi says, you have to expose the new attribute, unless you work with a dynamic schema in which case FME will recognize the created attribute as the same as defined in the schema. 

 


Reply