Hi all,
I'm trying to achieve a geometry update of a feature via a calculation attribute rule.
The attribute rule is triggered by the update event, and the goal is to update the geometry of the self feature querying a geometry from other feature class. The first step, that creates the new geometry works fine, but when I return the update operation, ArcGIS Server crashes. I think is some kind of recursively problem but i'm not sure.
Any body knows the way to achive this?
This is the arcade code:
var globalIdeq
var eq
var eqgeom
var bufferedGeometry
globalIdeq = $feature.id_baliza
eq = FeatureSetbyName($datastore, "vente.owner.balizas")
eqgeom = Filter(eq, "globalid = @globalIdeq")
for (var eqg in eqgeom) {
bufferedGeometry = buffer(Geometry(eqg),1000);
}
var update_features = [];
var results = {'result': 'manu'};
update_features[0] = {
'globalID': $feature.globalid ,
'geometry': bufferedGeometry
};
results['edit'] = [{
'className': 'vente.owner.incidencia_1',
'updates': update_features
}]
return results;
Thanks in advance
BR, Borja
Hey Borja
We don't recommend using DML to update the same feature, that will trigger further attribute rules and will end up in a cycle (shouldn't crash though)
In 2.7 we have introduced the ability to assign "SHAPE" field as a target field so you can update the feature's geometry directly. That is the recommended way.
Hi Hussein,
-Thank you for your quick response. It was what I was afraid of.
Also I've read that is only compatible with Pro 2.7 and ArcGIS Enterprise 10.8.1 isn't it?
Is it compatible with ArcGIS Enterprise 10.7.1? As is a geodatabase functionality? Do I have to create a EGDB with Pro 2.7?
Best Regards
Borja
unfortunately since this feature went into 2.7, it can only be used alongside 10.9.
Publishing a class that you assigned geometry to a 10.8.1 or earlier will fail to start the service since that feature doesn't exist in old releases.
You can however use and test this on client side in 2.7 (filegdb or client/server enterprise)