Select to view content in your preferred language

Save Arcade Expressions

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)

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.  

by Anonymous User

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.


I agree with everyone's comments above. I am building a web map with a lot of different infrastructure categories added as different layers. Within their respective popups I have an arcade expression asking the same question of the surrounding data.

As a result I spend my time copying and pasting arcade expressions from layer to layer. What would be cool would be having our Arcade expressions saved within our AGOL content. We do name them after all. So in practice, I could open a popup Attribute Expression editor and view a drop down menu of existing scripts. 👍

Maybe an option within the editor to "Save this expression."

That would also help in cases such as @MegHoole  described at the start of this thread.


Yes we need this! I repeatedly create the same product for different clients. I need this functionality. 


I would love to see an Arcade library as well.

It would be great to be able to:

  • Draft and save expressions between work sessions (with errors and before you get them working)
  • Use existing saved expressions as a starting point for new ones (an option from within a webmap, dashboard, etc).
  • Categorize expressions by profile type ( Web Maps: pop-ups, symbology, labelling / Dashboards: Data expressions, indicator and list formatting / etc).
  • View which apps, maps, and other AGOL products a saved expression is being used in.
  • Edit and test expressions from within the library like the Arcade playground

I don't want to have to save my very important code in documents outside of AGOL if I am only ever using them (and updating them) in AGOL.





I agree with all comments above. It would be great if we could save Arcade expressions and re-use them no matter where they are written (e.g. dashboard, web map).


Yes, please! Would be so useful to be able to reuse and even load into another environment (e.g. when passing from dev to prod...)