Solved

AttributeManager add a constant to a decimal value

  • 23 August 2018
  • 5 replies
  • 16 views

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

icon

Best answer by takashi 23 August 2018, 09:26

View original

5 replies

Userlevel 3
Badge +17
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?

 

 

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.
Userlevel 3
Badge +17

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.

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)
Userlevel 1
Badge +21

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