Skip to main content
Solved

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

  • July 23, 2022
  • 6 replies
  • 29 views

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

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

gav
Contributor
Forum|alt.badge.img+10
  • Contributor
  • 11 replies
  • 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
  • 11 replies
  • 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))

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


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

Thank you for the help. It works fine

 

Clip_908 

Clip_909 

 

 

 

 

 

 

 

 


gav
Contributor
Forum|alt.badge.img+10
  • Contributor
  • 11 replies
  • July 24, 2022

Thank you for the help. It works fine

 

Clip_908 

Clip_909 

 

 

 

 

 

 

 

 

Rock on


geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • Best Answer
  • July 25, 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))

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
  • 342 replies
  • July 25, 2022

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