Using Field Maps Designer in AGOL.
FeatureSetByPortalItem() causes Field Maps to hang.
A spinning circle appears when clicking Submit.
This happens using different code, and different feature services.
Next.
FeatureSetByName() removes the Feature Service from the Web Map, after using in Field Maps.
Is Field Maps completely broken when pulling data from a service?
Here is sample code, sent to me by esri support.
var fsShapeFields = FeatureSetByName($map, "Parks", [], false);
var testVal = Intersects($feature, fsShapeFields);
var value = "OUT";
for (var testfeature in testVal) {
value = "IN";
break; // Stop at the first intersection
}
return value
Here is code for breaking Field Maps using FeatureSetByPortalItem().
var fsShape = '00c4ade0275e4f4c97ac68d20d3c2952'
var fsShapeFields = FeatureSetByPortalItem(Portal(arcgisPortal), fsShape, 0, ['TAXLOT'], false)
var value = "OUT"
var testVal = Intersects($feature, fsShapeFields)
for (var testfeature in testVal) {
var fsSelection = Within(fsShapeFields, Centroid($feature))
var fsSelectionFirst = First(fsSelection)
var fsText = Text(fsSelectionFirst.TAXLOT)
value = fsText
}
return value
Thank you