The schema I use for the ADMS solution is different to the one that comes out of the box, but when I define variables for attribute fields that I would like populated for the attribute rule "Create Site Address Points," they always come back as object not found.
For example, here are the variables I would like to add under the "Define the Site Address fields" portion of the code:
// Define the Site Addresses fields
//existing
var addressptid_field = "addressid";
var addrnum_field = "housenumber";
var roadfullname_field = "fullname";
var status_field = "status";
var defaultstatus = "Pending";
var addrcapturemeth_field = "capturemethod";
//additional
var predir_field ="predir";
var streetname_field ="streetname";
var sufdir_field ="sufdir";
var suftype_field ="suftype";
var unittype_field ="unittype";
And here is the original vs updated code I have tried to use to populate these fields
// Create an array of 1 or more new site address point as specified
// Store the related address point id, the calculated address number, the intersecting road name and set the status to Pending
var adds = []
for(var i=0; i<numpoints; i++) {
Push(adds, {
'attributes': Dictionary(addressptid_field, id, status_field, defaultstatus, addrnum_field, addrnum, roadfullname_field, intersectingRoad[fullname_field], addrcapturemeth_field, $feature[capturemeth_field]),
'geometry': newPoint
})
addrNum += increment;
}
//updated
// Create an array of 1 or more new site address point as specified
// Store the related address point id, the calculated address number, the intersecting road name and set the status to Pending
// Do we need id in the attributes list?
var adds = []
for(var i=0; i<numpoints; i++) {
Push(adds, {
'attributes': Dictionary(addressptid_field, id, status_field, defaultstatus, addrnum_field, addrnum, roadfullname_field, intersectingRoad[fullname_field], addrcapturemeth_field, $feature[capturemeth_field], predir_field, intersectingRoad[predir], streetname_field, intersectingRoad[streetname], sufdir_field, intersectingRoad[sufdir], suftype_field, intersectingRoad[suftype], unittype_field, unittype),
'geometry': newPoint
})
addrNum += increment;
}
Any ideas as to what I am doing wrong here? @ChrisFox
Thanks!