Skip to main content
Solved

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


jamal
Forum|alt.badge.img+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 

 

 

Best answer by geomancer

gav wrote:

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

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

6 replies

gav
Contributor
Forum|alt.badge.img+10
  • Contributor
  • July 23, 2022

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


gav
Contributor
Forum|alt.badge.img+10
  • Contributor
  • July 23, 2022
gav wrote:

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


jamal
Forum|alt.badge.img+5
  • Author
  • July 24, 2022

Thank you for the help. It works fine

 

Clip_908 

Clip_909 

 

 

 

 

 

 

 

 


gav
Contributor
Forum|alt.badge.img+10
  • Contributor
  • July 24, 2022
jamal wrote:

Thank you for the help. It works fine

 

Clip_908 

Clip_909 

 

 

 

 

 

 

 

 

Rock on


geomancer
Evangelist
Forum|alt.badge.img+51
  • Evangelist
  • Best Answer
  • July 25, 2022
gav wrote:

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


jamal
Forum|alt.badge.img+5
  • Author
  • July 25, 2022
geomancer wrote:

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 

 

 

 

 

 

 

 

 


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