WF5 Arcade Activity - Async Arcade must be enabled on this script
Hello
I am wanting to run an arcade script that generates a new featureset which i will use in a show results activity. The arcade consists of a few loops, and i have tested it with a hosted feature layer on AGOL. When i run my workflow i get an error “Async Arcade must be enabled on this script”.
How do i enable Async?
My arcade is
var DistinctIntersectingBuffers_FS = distinct($IntersectingBuffers,'Area')
// create empty featureset using list of fields and specifying geometry
var final_dict = {fields:[{'name':'Sites',
'type':'esriFieldTypeString'},
{'name':'Area_',
'type':'esriFieldTypeDouble'}],
'geometryType': 'esriGeometryPolygon',
'features':[]
}
// loop through
for (var Intersect in DistinctIntersectingBuffers_FS){
var Inter_area =Intersect['Area']
console(Inter_area)
var MatchingIntersects = filter(IntersectingBuffers_FS,'Area=@Inter_area')
console(count(MatchingIntersects))
var SiteList =[]
for (var MI in MatchingIntersects){
var splitSites= Split(MI['Sites'], ', ')
for (var ss in splitSites){
push(SiteList,splitSites[ss])}
}
var f = {'geometry':geometry(first(MatchingIntersects)),
'attributes':{'Sites':Concatenate(distinct(SiteList),', '),
'Area_':Inter_area
}}
console(f)
push(final_dict.features,f)
}
return featureset(text(final_dict))
Thanks
Peter
Du måste logga in om du vill lämna en kommentar.
Kommentarer
0 kommentarer