Hello,
I'm hoping what I have is simple issue someone can see easier than me. I'm simply trying to aggregate trail names and sum their segment lengths to display in a dashboard list:
var portal = Portal('https://www.arcgis.com/');
var fs = FeatureSetByPortalItem(Portal,
'7b1fb95ab77f40bf8aa09c8b59045449',
0,
[
'TRLNAME',
'LengthMiles'
],
False //don’t include geometry
);
return GroupBy(fs, 'TRLNAME', { name: 'LengthMilesSum', expression: 'LengthMiles', statistic: 'SUM' });
The expression as is returns the error: Test execution error: Aggregation field not found. Verify test data.
I've tested enough to know that the error is in the group by function. Would love any help / tips.
Thanks!