Save Arcade Expressions

317
4
05-15-2019 11:11 AM
Status: Open
Occasional Contributor III

I want to be able to save Arcade Expressions in AGO.  Business case:  I wrote an arcade expression to style a layer.  I then clicked the "reset to default style" button and saved.  And to my chagrin, it blew away my recently written arcade expression ... requiring me to rewrite the expression so that I could use it instead of the default style, after I changed my mind.

Tags (2)
4 Comments

I agree, and I would add that it would be very nice if there was an easier way to copy/access arcade expressions between layers and webmaps.  I'm working on a series of maps right now that display the same basic information in a variety of ways, and I'm probably spending more time switching between AGO tabs, opening expressions, and copy/pasting code than most of the other phases of the project combined.  One layer with a heavily-customized pop-up has 19 attribute expressions, a custom-configured pop-up that uses all of them, and Arcade-based styling. I use multiple versions of the layer at different zoom levels (zoom-based styling in AGO would also be nice, come to think of it), and keeping the pop-ups consistent between layers is increasingly labor-intensive.  

we should create an arcade expression library to save our favorites expressions

Being able to simply (re)apply an expression from a personal library would be terrific.

Being able to update an expression for all Layers within a Webmap without pushing all their seperate buttons would be the next step.

Bill Schlatter

I know you are probably past this project but for future help you can use ArcGIS Online Assistant to copy and paste the expressions between different layers. You have to be careful that you do not alter any of the other json, but it sure beats copying at pasting x amount of expressions back and forth between 2 layers in a webmap or visualization screen and having to go through creation process all over again.