Skip to main content
Solved

AttributeManager add a constant to a decimal value


Folks,

This should be simple but I'm just not finding the answer.

Using an AttributeManager I want to add a value "0.09" to all the existing values in a column of data from a Mapinfo table during translation amongst other things.

The Column is "Average" and is a defined Decimal type field.

The syntax I'm using is clearly wrong.

@Value(Average)+0.09

returns -9999.00 for all values.

What am I doing wrong?

Thanks in advance

Andrew

Best answer by takashi

You have to enter a math expression with the Arithmetic Editor. You can open the editor from the menu command "Open Arithmetic Editor" under the menu button in the parameter field.

View original
Did this help you find an answer to your question?

5 replies

takashi
Evangelist
  • August 23, 2018
Are there some warning messages in the Log?

 

If you connect an Inspecter transformer to the output port of the AttributeManager and run the workspace, what result would appear on the Table View in FME Data Inspector?

 

 


  • Author
  • August 23, 2018
takashi wrote:
Are there some warning messages in the Log?

 

If you connect an Inspecter transformer to the output port of the AttributeManager and run the workspace, what result would appear on the Table View in FME Data Inspector?

 

 

Thanks @takashi.

 

 

Yes there is an error

 

Attribute Average of type decimal has an illegal value of '57.41+0.09'. Value is set to -9999 
So that's pretty explicit I'm just not sure what the problem is.

takashi
Evangelist
  • Best Answer
  • August 23, 2018

You have to enter a math expression with the Arithmetic Editor. You can open the editor from the menu command "Open Arithmetic Editor" under the menu button in the parameter field.


  • Author
  • August 23, 2018
takashi wrote:

You have to enter a math expression with the Arithmetic Editor. You can open the editor from the menu command "Open Arithmetic Editor" under the menu button in the parameter field.

0684Q00000ArKluQAF.png

Thanks @takashi. That was it. The correct syntax is

 

 

 

@Evaluate(@Value(Average)+0.09)

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • August 23, 2018
takashi wrote:

You have to enter a math expression with the Arithmetic Editor. You can open the editor from the menu command "Open Arithmetic Editor" under the menu button in the parameter field.

I'm sure there's an idea around somewhere for a warning when it looks like arithmetic has been put in the text editor.

 

 


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