Skip to main content

FME Desktop 2022: “AttributeCreator” fails to copy a field into another using the arithmetic editor,

 

In the screenshot below, I wanted to copy the “fme_text_string” field to the “F1” but appears not work except for the first record.

 

What could be the issue here?

 

The data and workbench are attached

 

 

 

Clip_227 

 

You shouldn't need an arithmetic calculation if you aren't making any changes to the fme_text_string value. Simply make the Attribute Value in the AttributeCreator = fme_text_string.

 

You can also do without the TestFilter by using the Conditional Values function in the AttributeCreator.


Thank you for the help.

 

I never figure it out why it fails when using arithmetic editor

 

 

Clip_230


 

The issue is replicated as I wanted to multiply “F1” field with 2, for example. It just multiplies the first record and fails for other.

 

What could be the issue here?

 

Clip_231 


Try using this expression into the AttributeValue.

 

@Evaluate((@ReplaceString(@Value(F1),",","")*2))


It works fine. However, as I applied it to another field, it fails as per the second screenshot

 

Is this code generic?

 

 

Clip_236 

Clip_237 

 

 

 

 

 


The code is generic for any attribute where you want to remove commas. But to remove "%", convert the number to its true value, and multiply by 2, try

@Evaluate((@ReplaceString(@Value(Percent_Legend),"%","")*0.02))

 


Thank you very much for the help. It works fine

 

 

Clip_238 

 

 

 

 


Reply