Load Arcade into expression builder(s)

362
2
10-16-2023 12:21 PM
Status: Already Offered
Labels (1)
AlfredBaldenweck
MVP Regular Contributor

I would like to be able to load Arcade expressions to the expression builder, similar to loading in SQL queries to the various SQL expression windows.

AlfredBaldenweck_1-1697483450964.png

I want this but for Arcade

My use-case is as follows: 

  • I just made a great popup expression that will print (and format) all aliquots intersecting the feature.
    • Almost any feature class would find this useful, particularly because it references a service, so the user doesn't even need to have the intersecting features in their map.
  • Because it's so useful, people are going to want to have it on most of their layers.
  • There is no easy way to do that.

Sure, you could copy and paste, but this expression is 160 lines that they have to track down, copy, and paste. For every layer, in every map.

This is tedious and prone to user-error.

If we could import a text file (literally a txt, no need to get fancy-- if it's a working expression, it'll work. Otherwise, the expression validator will call an error.), then all I'd have to do is store the expression where my users could get it, then they could just pop it in through the "Load Expression" button and edit as needed.

This would also make it easier to remember the location of snippets, and again, prevent users from having to copy-paste 160 lines of code. 

 

(If a similar functionality were implemented for python snippets [see: field calculations], I wouldn't be mad about it either.)

Related ideas for Online/Enterprise :

2 Comments
CraigWilliams
Status changed to: Already Offered

There are Load (folder) and Export (arrow) commands at the bottom of the expression builder.

AlfredBaldenweck

Oh, good to know.

It looks like that looks for a different file type (LXP) from what calculate field looks for (CAL). Are there plans to merge the two at any point?

Reason being that sometimes you need to firm up a popup expression by making it a real field, which brings me back to the copy-paste problem.