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
}
Solved! Go to Solution.
Zoggo,
Yes. Your code looks fine, the issue may be that the attribute rule is not configured in a way to allow it. Do you have the Exclude from Application Evaluation parameter checked?
This allows the application to see tables not present in the service. This is outlined here.
~ Jake
Zoggo,
Yes. Your code looks fine, the issue may be that the attribute rule is not configured in a way to allow it. Do you have the Exclude from Application Evaluation parameter checked?
This allows the application to see tables not present in the service. This is outlined here.
~ Jake
That works for me. Thanks a lot!
No problem. Can you check and post if were able to do so?