Select to view content in your preferred language

Symbology: Arcade returning numbers actually returns them as text.

501
3
11-05-2024 07:17 AM
Status: In Product Plan
Labels (1)
AlfredBaldenweck
MVP Regular Contributor

Pro 3.1.3

When symbolizing by an Arcade Expression, the values are always text, even when explicitly told to return a number.

In this example, I have a Short Integer field called "Hmm".

If I symbolize by it directly, the symbol classes are sorted numerically

AlfredBaldenweck_0-1730819645270.png

However, if I go into the Arcade Editor and input 

Number($feature.Hmm)

It will sort the output as if it is Text.

AlfredBaldenweck_1-1730819723165.png

 

AlfredBaldenweck_2-1730819752743.gif

I've noticed that it applies the color scheme in the correct order (e.g. 10 is always red), but the classes are sorted incorrectly.

Please change this behaviour.

3 Comments
ClayDonaldsonSWCA

I would suggest using leading 00s as workaround How To: Add Leading Zeroes to Labels in ArcGIS Pro.
But I agree, it would be nice to have something like this supported or even in the GUI:

return {"type":number, "value":Number($feature.Hmm)}

 

 

CraigWilliams
Status changed to: Under Consideration

Unique values are always stored as strings, but we're sorting numerically for number fields which is why the behavior is different. Thanks for bringing this to our attention.

ValeriaChavez
Status changed to: In Product Plan