Arcade label expression created in ArcGIS Pro doesn't properly work in AGOL

1188
2
Jump to solution
09-02-2020 11:36 PM
EkremCanli2
New Contributor III

Simple task: I've created some contours, I only want my even numbers to show on my contours as labels. Since some of those come with a lot of decimal places, I've added a round function. This perfectly works in ArcGIS Pro. When I share my map as a Web Map to AGOL, it still shows only my even labels, but won't respect the round function (left side ArcGIS Pro and the label expression menu, right side AGOL):

The label expression in AGOL is still there, but it won't apply onto the map:

€1: yes I know creating the variable is useless in this example...but it won't work either way.

€2: oh and now that I see it: the label placement in ArcGIS Pro was set to 'Shield', while on AGOL it's shown differently.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
JoshuaSharp-Heward
Occasional Contributor III

Hi,

I can't explain exactly why it's giving different results, but in your arcade expression you're returning the full value instead of the rounded value. In your IIF statement if you replace the second $feature.Contour (after the "0,") with round($feature.Contour, 1) it might do what you're wanting.

View solution in original post

2 Replies
JoshuaSharp-Heward
Occasional Contributor III

Hi,

I can't explain exactly why it's giving different results, but in your arcade expression you're returning the full value instead of the rounded value. In your IIF statement if you replace the second $feature.Contour (after the "0,") with round($feature.Contour, 1) it might do what you're wanting.

EkremCanli2
New Contributor III

*Doh!* You're totally right...now it works also in AGOL. But why was it working in Pro? Probably ArcGIS Pro being ArcGIS Pro again 🙂 Thanks!