I'm using attribute rules to calculate the name of a community when editing a new polygon. All our datasets are hold in a enterprise geodatabase. We do editing with branch versioning and services. Basically the arcade script is working when I put the community feature class in the same edit service as the editing polygon feature class. Is there a way to access the community feature class without add it to the service? Both FC are in the same enterprise geodatabase.
This is my arcade code for the calculation:
var fsGemeinden = FeatureSetByName($datastore, "AGIS_409_Dev.U_ALG_APP.va_gemeinde_sv", ["GEMEINDE"], true)
var fsGemeindenIntersect = Intersects(fsGemeinden, Geometry($feature))
if (Count(fsGemeindenIntersect) >0){
var maxGemeinde
var maxArea = 0
for (var gemeinde in fsGemeindenIntersect){
var areaGemeinde = Area(Intersection(gemeinde,$feature))
//console(areaGemeinde)
if (maxArea < areaGemeinde){
maxGemeinde = gemeinde
maxArea = areaGemeinde
}
}
console (maxGemeinde.GEMEINDE)
return maxGemeinde.GEMEINDE
}