Solved

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


Badge +5

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 

 

icon

Best answer by dustin 10 March 2022, 20:21

View original

7 replies

Userlevel 3
Badge +26

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.

Badge +5

Thank you for the help.

 

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

 

 

Clip_230

Badge +5

 

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 

Userlevel 3
Badge +26

Try using this expression into the AttributeValue.

 

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

Badge +5

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 

 

 

 

 

 

Userlevel 1
Badge +11

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))

 

Badge +5

Thank you very much for the help. It works fine

 

 

Clip_238 

 

 

 

 

Reply