I am trying to write an attribute rule that will compare the field "FITTING_SIZE" in a Fitting (in this case a Water Tap) to the DIAMETER field in the Intersecting Water Service Line. Because the Tap also intersects with the Water Main, I'm using FilterBySubtypeCode to get only the Service Line, which has a SubType of 2. The following code always returns false and I'm not sure what I'm doing wrong. Currently I'm working in a file geodatabase in preparation for conversion to the Utility Network. Any assistance is appreciated.
var TapSize = Intersects((FilterBySubtypeCode(FeatureSetByName($datastore, "WaterLine", ["DIAMETER"], false),2)), $feature) ;
if (TapSize == $feature.FITTING_SIZE) {
return true ;
} ELSE {
return false
}