I am writing a script to create a junction point in a utility network with attribute rules. But when I ran the execute, the following error is shown:
Traceback (most recent call last):
File "CreatePolygonCentroid.py", line 76, in <module>
junCur.insertRow(insRow)
RuntimeError: Arcade script raised an error. [
Rule name: Division,
Triggering event: Insert,
Class name: StormwaterJunction,
GlobalID: {48BEB490-EF59-4756-818A-BDB41DD071E0},
Script error: result = null]
And below is the "Division" rule:
var featureSet = FeatureSetByName($datastore,'B_DSD_District', ['DIV'], true);
var featureSet2 = Intersects(featureSet, Geometry($feature))
var result = First(featureSet2)
if(result==null)
return {"errorMessage": "result = null"}
else
return result.DIV
How can I create the junction by script without disabling the attribute rules?