Return Arcade fields within Search Widget

10-05-2021 03:01 PM
Status: Open
Occasional Contributor

The majority of the datasets that we deal with are dynamic layers so we make huge use of the Arcade intersect capabilities to find out how properties interact with these layers. 

I really need to see the capability within the search widget to return arcade expressions similar to the popup that might show.

It would be a massive step backwards for us to have to add property information to every single layer that we have.  This would be duplication of data and a massive upkeeping with property changes happening in our growing town. 

For example, searching an address and finding out what the refuse pickup day is, or searching an address and finding out what the closest fire hydrant is.  


This is a nice idea, but I don't know that it's feasible. An Arcade expression runs at the time of clicking the popup; a few intersections for a feature or two shouldn't be terribly time-consuming.

For the Search bar to work, the values would all need to be present in order to be searchable. This would effectively be like running a full-layer field calculation every time you used the search bar. And the way the expression evaluates, you'd be calling out to the intersecting layers for each feature individually.

Say you had 100 feature in a layer, and three expressions to intersect your features with other layers. This would result in 300 spatial operations, and 100 pings per service for the intersected layers.

The dynamic nature of the layers makes static fields less useful, but I would consider as an alternative creating a script that re-calculates these intersected values at regular intervals. Using the ArcGIS Python API, a simple field calc every X minutes / hours / days would be a very simple, lightweight script that could run on even very basic machines.


As @jcarlson pointed out, these Arcade expressions in the pop-up are super useful, but are kind of floating in memory. In this same way, we can't export the fields calculated by Arcade expressions to CSV (though I think there are some exceptions... such as simple math calculations).

I think what the real solution for this would be is Support for Attribute Rules in hosted feature layers, which would hard calculate those values into the data. Please consider an added vote for that.