Solved

FME 2022 Build22153: Calculating the value of an attribute fails,


Badge +5

FME 2022 Build22153: Calculating the value of an attribute fails,

 

In the screenshot below, I wanted to calculate the “BuildingPercent” attribute field by dividing “BuildingArea” field on “BoundaryArea” field but appears not to work. It doesn’t perform the calculation.

 

What could be the issue here?

 

The data and the workbench are attached

 

Clip_905 

 

 

icon

Best answer by geomancer 25 July 2022, 10:09

View original

6 replies

Badge +3

Hi @jamal​  - The AttributeCreator needs to know you are wanting to do a calculation with those fields, so you need to wrap it with @Evaluate()

 

So, for your example, the attribute value needs to be:

@Evaluate( @Value(BuildingPercent)/@Value(BuildingArea))

Badge +3

Hi @jamal​  - The AttributeCreator needs to know you are wanting to do a calculation with those fields, so you need to wrap it with @Evaluate()

 

So, for your example, the attribute value needs to be:

@Evaluate( @Value(BuildingPercent)/@Value(BuildingArea))

Correction: @Evaluate(@Value(BuildingArea)/@Value(BoundaryArea))

Badge +5

Thank you for the help. It works fine

 

Clip_908 

Clip_909 

 

 

 

 

 

 

 

 

Badge +3

Thank you for the help. It works fine

 

Clip_908 

Clip_909 

 

 

 

 

 

 

 

 

Rock on

Userlevel 4
Badge +36

Hi @jamal​  - The AttributeCreator needs to know you are wanting to do a calculation with those fields, so you need to wrap it with @Evaluate()

 

So, for your example, the attribute value needs to be:

@Evaluate( @Value(BuildingPercent)/@Value(BuildingArea))

Or use the Arithmetic Editor for calculations (instead of the Text Editor), this will add the @Evaluate automatically.

Open_Arithmetic_Calculator

Badge +5

Or use the Arithmetic Editor for calculations (instead of the Text Editor), this will add the @Evaluate automatically.

Open_Arithmetic_Calculator

Thank you for the contribution. This makes much more sense for me. Great

 

Clip_913 

Clip_914Clip_915 

 

 

 

 

 

 

 

 

Reply