I'm using Arcade in ArcGIS Pro and trying to label a feature using one field if under a certain map scale, and using a different field if above that scale. So when zoomed in close you get the full label and when zoomed out it is abbreviated.
It seems that according to this documentation, the profile $view.scale should be compatible in ArcGIS Pro. The expression validates but then gives a Drawing Error: Object not found $view.
Also, according to this old Ideas submission this functionality is marked as Implemented. Using the same expression in a webmap works, but again according to the documentation linked above it seems it should function in Pro as well.
What am I missing?
Which version of ArcGIS Pro are you using? According to the documentation, $view was implemented in Arcade 1.30. In the version matrix, this version is available in ArcGIS Pro 3.5 only.
I'm using ArcGIS Pro 3.5
It's working on my machine with ArcGIS Pro 3.5.1
Well, I got it working although I still don't know why it wasn't working before. The Pro project I was using is one I've been using for daily tasks and edits for several years and carried over from one ArcGIS Pro version to another since probably v2.5. Opened up a newer project and a brand new blank one and it worked instantly in both environments.
I'll be retiring that project file and begin a new one.