static fromFeatureSet(a, f) {
a = q.convertFromFeatureSet(a, f.objectIdField);
return l.fromOptimizedFeatureSet(a, f)
}
static fromFeatureSet(a, f) {
var g = {};
Object.getOwnPropertyNames(f).concat(Object.getOwnPropertyNames(Object.getPrototypeOf(f))).forEach(function(h) {
if (typeof f[h] != "function")
g[h] = f[h];
});
if (a.spatialReference)
g.spatialReference = f.spatialReference.constructor.fromJSON(a.spatialReference);
f = g;
a = q.convertFromFeatureSet(a, f.objectIdField);
return l.fromOptimizedFeatureSet(a, f)
}
Hi @JoelBennett, thanks for posting your question here. Would you be able to share a simplified app that reproduces the error you shared? I tried to create an app with a labeled FeatureLayer using the Round function in Arcade: https://codepen.io/noash/pen/Byaedpe?editors=1000
The FeatureLayer is from a MapServer that was published with wkid: 4269 spatial reference. However, the MapServer was not published with labels, so perhaps that is the key.
Aloha Noah, thanks for following up. Your example uses the Shape_Length field, so doesn't exhibit the problem, since that's a numerical attribute. The problem I'm running into appears to happen when using the Geometry function. In your example, I changed the expression to:
expression: "Round(Length(Geometry($feature),\"feet\"),2)"
In doing so, I was surprised to find it working. I then changed line 22 to use version 4.31, and the labels stopped appearing, although there weren't any errors in the console. It appears that perhaps this may have been fixed in 4.32. I haven't started testing with 4.32 yet, but plan to later this week or next. When I do, I'll try this issue out and see what happens.
After testing, I've concluded this was fixed in 4.32 since the situation described above now works without having to apply any fixes.