I've been tasked with migrating from ArcMap's Attribute Assistant set up to ArcGIS Pro's Attribute Rules for our Address Management. In Attribute Assistant, we used COPY_LINKED_RECORD to populate the different parts of the address (e.g. RoadPreDirection, RoadName, RoadType, RoadPostDirection) once the user entered the FullRoadName.
I have a table MasterStreetNames that includes all that information so I'm trying to code that relationship so it pulls the needed value. This is what I have so far - but it's currently giving me the error of Field Not Found ?
Any guidance is appreciated!!
var lookupField = "RoadPreDirection"
var commonField = "FullRoadName"
var sourceTable = FeatureSetByName($datastore, "MasterStreetName", [commonField, lookupField], false)
var commonValue = $feature[commonField]
var matchedFeatures = Filter(sourceTable, `${commonField} = @commonValue`)
var matchedFeature = First(matchedFeatures)
return Iif(matchedFeature == null, null, matchedFeature[lookupField])