Skip to main content
Question

I have a question regarding editing multiple conditional values in a table.

  • February 16, 2023
  • 5 replies
  • 55 views

fhyde
Contributor
Forum|alt.badge.img+3
  • Contributor

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

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

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.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • February 17, 2023

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.


Forum|alt.badge.img+2
  • February 17, 2023

@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
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • February 17, 2023
markatsafe wrote:

@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.


fhyde
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • February 17, 2023
nielsgerrits wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings