Hello everyone,
I'm working with Arcade here in Experience Builder dev edition 1.19. I want to run a sum function on a filtered featureset, but I'm running into a strange issue where Small Integer fields (and doubles) can be summed, but Integer (long integer in my dataset) cannot. Here's the fields of the map service:
And here's trying to sum a small integer (note, not really a field I actually want to sum, just using it to illustrate the point)
var fs = getFilteredFeatureSet($dataSources["dataSource_12-18c82b170ef-layer-17"]); // Assessed Value
//var integerField = sum(fs,"Assessed_Value")
var smallIntegerField = sum(fs,"Quintile_Year")
return {
value: smallIntegerField,
text: {}
};
But, when I attempt to sum a field that is simply an Integer...
var fs = getFilteredFeatureSet($dataSources["dataSource_12-18c82b170ef-layer-17"]); // Assessed Value
var integerField = sum(fs,"Assessed_Value")
//var smallIntegerField = sum(fs,"Quintile_Year")
return {
value: smallIntegerField,
text: {}
};This one has me stumped. Anyone run into this yet?
why are lines 8 in both images the same? (eg smallIntegerField)
did you forget to change line 8 to integerField in line 8 in the second image?
Heh yes I did forget to change that but the error message is coincidentally the same which is probably why I missed it. I've continued testing too and it does seem like other math functions like min(), max() and mean() all work on the long integers, it's just sum() that is causing the error. I've tested with multiple long integer fields in multiple datasets at this point.