ARCADE Expression: Fails Error Check - Still Outputs Correct Field Calculation

655
2
Jump to solution
06-23-2020 09:34 AM
by Anonymous User
Not applicable

Was running the GP Field Calculator in Pro, the expression did not check out, but returned the desired output. First time running across this, so I thought I would share.

0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor

Hi Brian Acheff ,

Thanks for sharing. The only thing I can imagine is that Arcade normally prefers to work with fields that have an underscore in the name in a different way (this goes for line 1 and 2): 

var x = $feature["PASER_2016"];

When I look at the parser on the left, there is something weird going on, since it seems to change the formula:

Also; wouldn't it be easier to say "y-x" instead of "(x-y)*(-1)"?

View solution in original post

0 Kudos
2 Replies
XanderBakker
Esri Esteemed Contributor

Hi Brian Acheff ,

Thanks for sharing. The only thing I can imagine is that Arcade normally prefers to work with fields that have an underscore in the name in a different way (this goes for line 1 and 2): 

var x = $feature["PASER_2016"];

When I look at the parser on the left, there is something weird going on, since it seems to change the formula:

Also; wouldn't it be easier to say "y-x" instead of "(x-y)*(-1)"?

0 Kudos
by Anonymous User
Not applicable

Xander Bakker

No problem, happy to be able to share.

Concerning the equation, yes, you are correct. Thank you for bringing that to my attention.

0 Kudos