Skip to main content

From Attribute Manager I have about 150 columns on which I have to run a series of condtitional query's to populate them. So far the only way I have found to do this is to open each "else if" option individually and adapt the text contained. The change could be easily done whith a simple "search/replace" process within a text editor such as Notepad++. The attached image shows the text circled in red that needs to be replaced with a another constant value.  Unfortunately I can't find any way to make those changes within FME's "text editor" in the Attribute Manager". 

image.png

Not knowing what you try to do initially, I have to say I would prefer another kind of solution than an AttributeManager with this much conditional values. That being said, you can open a .fmw file in a text editor and try to do the search/replace there. It can be tricky, but it does work.


With only one conditional i would, if enough attributes are queried, explode them.

Then you can get away with just one conditional on name/value pairs.


@fhyde​ I would agree with @gio​ use AttributeExploder, do the test, then follow by Aggregator to piece everything back together again.

An alternative is to convert the attributes into a list attribute (ListPopulator) and then write a small python script to do the logic - see the example at the end of this article.

But it seems that it might be better to understand the whole workflow and then re-engineer it if possible


@fhyde​ I would agree with @gio​ use AttributeExploder, do the test, then follow by Aggregator to piece everything back together again.

An alternative is to convert the attributes into a list attribute (ListPopulator) and then write a small python script to do the logic - see the example at the end of this article.

But it seems that it might be better to understand the whole workflow and then re-engineer it if possible

I'll have to look into the option of the Exploder followed by the aggregator as you suggest. @gio​ and @markatsafe : thanks for the suggestion.


Not knowing what you try to do initially, I have to say I would prefer another kind of solution than an AttributeManager with this much conditional values. That being said, you can open a .fmw file in a text editor and try to do the search/replace there. It can be tricky, but it does work.

It does look tricky but I had no idea I could open a workspace in notepad++. Good to know.


Reply