Hi Mel,
You say in your post ...
>> So for example for the layer address points I want it to use the field ADDRESS_LABEL and for Roads I want it to use the field STREET. I have those listed in the TEXT_FIELD but it just labels them with the text "STREET" and "ADDRESS_LABEL"
What I think you can do is run your data through an AttributeExploder - this will create attribute name/value pairs as _attr_name and _attr_value for every attribute in your data schema. What you can then do is a TESTER where:
TEXT_FIELD = _attr_name
Where this is true, your label value is the value contained in _attr_value
- you will probabaly also need to set "keep Attributes = Yes" on the AttributeExploder so you can do the test.
Hope this helps
Regards
Mike
Hi, I've tried to do a lot of this, and have had varying degrees of success. And to be honest it worked better in older version of FME rather than the new one.
The old method I used was the create an attribute inside a custom transformer, then use an attribute setter (exposing it's source attribute field) to set that temporary attribute with the value of some other attribute. You then use the temporary attibute to work with throught the custom transformer. This worked well in older versions where the attribute where you the exposed field wasn't requesting multiple inputs, only the one. It then made your custom transformer look like a proper FME one.
I haven't found a good solution yet for the latest version of FME, I think they've made things a bit limited both with the parameter fetcher and the attribute setter. I keep copying older versions into my workspace to get the desired effect.
I agree that having a transformer that let's you select the NAME of an attribute as opposed to it's value would be of great use and you would be able to develop nice looking custom transformers that way. Of course the new version of FME has lot's of nice little fesatures and there could be a work around that they haven't mentioned...?