Select to view content in your preferred language

Arcade "First" function not working post June 2026 Update

172
5
yesterday
Labels (1)
CarterHughes
Occasional Contributor

Before the June 2026 update, this Arcade expression worked completely fine in returning the intersecting Montgomery County Watershed ID. I have isolated the issue to being the First function. The layers, the intersect expression, everything works but stops once the First function is introduced to yield the first item in the FeatureSet and thus its attribute value to be returned. The First function now results in a continuous loading spin if a point is placed in a location where a intersect is yielded.

Expression as is:

CarterHughes_0-1782823067147.png

Expression without First function, demonstrating the Intersects and preceding functions work:

CarterHughes_2-1782823528675.png

 

This is how it looks in the Instant App editor:

CarterHughes_1-1782823153923.png

 

Arcade code:

var agol = Portal("https://www.arcgis.com")
var fc = FeatureSetByPortalItem(agol, "2a3f5e6851a04dcdb9d8a6f796e9a431",4)
   
var fc_intersect = Intersects($feature, fc)

if(!IsEmpty(fc_intersect)){
    return First(fc_intersect)['ID']
}
else{
    return null
}
 
This should be replicable with any editable layer given that the source layer for the intersect, Watersheds used by Hansen (M-NCPPC), is publicly shared.

 

I am also submitting this as a case, but providing a link to this post since it enables screenshots to be shared.

 

0 Kudos
5 Replies
CarterHughes
Occasional Contributor

The workaround below works by avoiding the First function:

var agol = Portal("https://www.arcgis.com")
var fc = FeatureSetByPortalItem(agol, "2a3f5e6851a04dcdb9d8a6f796e9a431",4)
   
var fc_intersect = Intersects($feature, fc)

for (var f in fc_intersect) {
    return f['ID']
}
return null
0 Kudos
timcneil
Esri Contributor

Hi @CarterHughes , 

Sorry to hear you're experiencing an issue. 

We had a similar bug reported to Support that will have a fix going out tonight but it primarily impacted feature layers with very large numbers of features.

However, it may address this issue as well. Please check back after tonight's fix goes out and if it still is not fixed I would suggest reaching out to Support so we can take a closer look. 

Thanks, 

Taylor

CarterHughes
Occasional Contributor

Good to know about the potential fix shortly. I will follow up on this tomorrow.

CarterHughes
Occasional Contributor

@timcneil this issue is still active as of this morning. Any expression with the First function freezes and thus if used, locks all editing within the smart form aware editing sessions.

CarterHughes_0-1782911374651.png

The above has a few expressions that use first since it is the easiest way to grab the result of an Intersects, or other spatial operations, in Arcade expressions on a FeatureSet.

CarterHughes_1-1782911470498.png

I will update my sister case to this thread. Thanks for being responsive. Fortunate there is an equivalent method of grabbing this data using a loop but customers like us at Montgomery Parks will be playing wack-a-mole considering how commonly used the First function is or let editing sit idle until resolved.

CC @Tiff

0 Kudos
CarterHughes
Occasional Contributor

@timcneilIt appears fixed as of 9:58 AM some situations but not all. It appears this issue is still active in some cases. I will provide documentation of it once it is shared with me. Thanks.

CC @Tiff 

0 Kudos