One problem that I am having with my Arcade script is trying to pull the most recent spill date when clicking on the districts. This is what I have so far:
var intersectLayer =Intersects(FeatureSetByName($map,"Spill Service Requests"), $feature)
for (var f in intersectLayer){
return Max(f.SR_Date_Time)
}
I get a result of NaN and Type 'Number'. How could I get the result in the correct format and bring back the date, and possibly other fields for that record. Any help is greatly appreciated. Thanks