Acade is not update table element when zoom in and out map view

206
0
12-01-2023 06:38 AM
Labels (1)
WilliamSchooler
New Contributor

My Arcade Code totals the Footage and Mileage but it does not change totals when I zoom in or out in the map view.

Is there a setting I need to add to the Code?

 

here is my code

var fs = FeatureSetByPortalItem(arcgisPortal, ProjectID, LayerID, ['Type', 'Footage'], true);

Console(Count(fs));

var fsDict = {
'fields':[{'name': 'Type', 'type':'esriFieldTypeString'},
{'name': 'Footage', 'type': 'esriFieldTypeDouble'},
{'name': 'Mileage', 'type': 'esriFieldTypeDouble'}],
'geometryType': '',
'features':[]
};
Console(fsDict)
Console(Count(fs));


var index = 0;
for (var feature in fs){
// Console(feature)
fsDict.features[index++] = {
'attributes': {
'Type': feature['Type'],
'Footage': feature['Footage'],
'Mileage': feature['Footage'] / 5280
},
geometry: Geometry(feature)
}

}
Console(fsDict)

var fs_dict = FeatureSet(Text(fsDict));
return fs_dict

0 Kudos
0 Replies