Hello,
My organization is moving from Geometric Network to Utility Network and that means we have to move all of our Attribute Assistant methods to Attribute Rules. I was hoping to get assistance on one of them.
We number fire hydrants based on the corresponding valve. Both points are on the same line and that is the only relationship between them. All three features (hydrant, valve, and line) are in the same geodatabase. The attached code I am running comes up with an error mentioning "Invalid expression. Error on line 5. Wrong number of arguments." Hoping to get some help on this.
var valves = FeatureSetByName($datastore, "dwSystemValve");
var hydrants = FeatureSetByName($datastore, "dwHydrant");
var fireLines = FeatureSetByName($datastore, "dwLateralLine");
var intersectingValve = Intersects(valves, fireLines, true);
var intersectingHydrant = Intersects(hydrants, fireLines, true);
var commonFireLine = Filter(intersectingValve, intersectingHydrant);
var valveField = "NUM";
var hydrantField = "NUM";
var result = {};
for (var i in commonFireLine) {
var valveValue = commonFireLine[i].attributes[valveField];
var hydrantValue = commonFireLine[i].attributes[hydrantField];
result[valveValue] = hydrantValue;
}
result