<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Address Database Management Solution Object Not Found Error for new variables in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331235#M1125</link>
    <description>&lt;P&gt;So the first thing that gives me the error pertains to variable predir. Here is the original full code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;// This rule will create a new site address point when an address point is created along a road
// The site address point will be offset from the road by the distance and direction defined in the address point feature template

// Define the Address Points fields
var id_field = "addressptid";
var offdist_field = "offdist";
var offdir_field = "offdir";
var numpoints_field = "numpoints";
var incrementval_field = "incrementval";
var capturemeth_field = "capturemeth";

// Define the Site Addresses fields
var addressptid_field = "addressptid";
var addrnum_field = "addrnum";
var roadfullname_field = "fullname";
var status_field = "status";
var defaultstatus = "Pending";
var addrcapturemeth_field = "capturemeth";

// Define the Road Centerline fields
var fromleft_field = "fromleft";
var fromright_field = "fromright";
var toleft_field = "toleft";
var toright_field = "toright";
var fullname_field = "fullname";

// This function will return the new point offset perpendicularly from a 2-point line segment at a specified distance
// Positive distance is to the left of the line. Negative distance is to the right of the line 
function offsetPoint(firstPoint, secondPoint, fromPoint, dist) {
    var x1 = firstPoint.x;
    var y1 = firstPoint.y;
    var x2 = secondPoint.x;
    var y2 = secondPoint.y;
    var x3 = fromPoint.x;
    var y3 = fromPoint.y;

    var a = y1 - y2;
    var b = x2 - x1;

    var norm = Sqrt(a*a + b*b);
    a = a / norm;
    b = b / norm;

    return [x3 + a * dist, y3 + b * dist]
}

// This function will find the closest point on line_feature from point_feature
function closestPointInfo(point_feature, line_feature) {
    var vertices = line_feature["paths"]
    var x = point_feature["x"];
    var y = point_feature["y"];

    // Loop through each part of the geometry and each segment, tracking the shortest distance
    var shortest = [1e10];
    for (var i in vertices) {
        var part = vertices[i];
        var previous = part[0];
        for (var j = 1; j &amp;lt; Count(part); j++) {
            var current = part[j];
            var result = pDistance(x, y, previous["x"], previous["y"], current["x"], current["y"]);
            if (result[0] &amp;lt; shortest[0]) shortest = result
            previous = current;
        }

    }

    // Couldn't find anything
    if (Count(shortest) == 1) return null

    return {"distance": shortest[0],
            "coordinates": shortest[1],
            "isVertex": shortest[2],
            "lineSide": shortest[3]}
}

// This function will get distance between 2 points
function pDistance(x, y, x1, y1, x2, y2) {
  var A = x - x1;
  var B = y - y1;
  var C = x2 - x1;
  var D = y2 - y1;

  var dot = A * C + B * D;
  var len_sq = C * C + D * D;
  var param = -1;
  if (len_sq != 0) //in case of 0 length line
      param = dot / len_sq;

  var xx, yy;
  var is_vertex = true;
  if (param &amp;lt; 0) {
    xx = x1;
    yy = y1;
  }
  else if (param &amp;gt; 1) {
    xx = x2;
    yy = y2;
  }
  else {
    is_vertex = false;
    xx = x1 + param * C;
    yy = y1 + param * D;
  }

  var dx = x - xx;
  var dy = y - yy;
  return [Sqrt(dx * dx + dy * dy), [xx, yy], is_vertex, sideOfLine(x,y,x1,y1,x2,y2)];
}

// This function will get side of line segment that a point (x, y) is on based on the direction of segment [[x1, y1], [x2, y2]]
function sideOfLine(x, y, x1, y1, x2, y2) {

    var d = (x - x1) * (y2 - y1) - (y - y1) * (x2 - x1)
    if (d &amp;lt; 0) {
        return 'Left'
    } else if (d &amp;gt; 0) {
        return 'Right'
    } else {
        return null
    }
}

// This function will create point geometry from coordinates [x, y]
function createPoint(coordinates, spatial_ref) {    
    return Point({"x": coordinates[0], "y": coordinates[1], "z" : 0, "spatialReference": spatial_ref})
}

// This function will return the segment intersected and the distance along the line
function intersectDistanceAlong(sourceGeometry, interestedLine){
    var distanceAlongLine = 0;
    // Loop through the segments of the line. Handle multipart geometries
    for (var part in Geometry(interestedLine).paths) {
        var segment = Geometry(interestedLine).paths[part];

        // Loop through the points in the segment
        for (var i in segment) {
            if (i == 0) continue;

            // Construct a 2-point line segment from the current and previous point
            var firstPoint = segment[i-1];
            var secondPoint = segment[i]
            var twoPointLine = Polyline({ 'paths' : [[[firstPoint.x, firstPoint.y], [secondPoint.x, secondPoint.y]]], 'spatialReference' : firstPoint.spatialReference});

            // Test if the  point intersects the 2-point line segment
            if (Intersects(sourceGeometry, twoPointLine)) {
                // Construct a 2-point line segment using the previous point and the address point
                var lastSegment = Polyline({ 'paths' : [[[firstPoint.x, firstPoint.y], [sourceGeometry.x, sourceGeometry.y]]], 'spatialReference' : firstPoint.spatialReference});
                // Add to the total distance along the line and break the loop
                distanceAlongLine += Length(lastSegment);
                return [twoPointLine, distanceAlongLine]
            }
            // Add to the toal distance along the line
            distanceAlongLine += Length(twoPointLine);
        }
    }
    return null;
}

// This function will return the address number of the new site address point
// It determines this based on the from and to address range on the intersecting road and the direction of the offset
function getAddrNum(road, percentAlong, dir) {
    var addrNum = null;
    var from = road[fromleft_field];
    var to = road[toleft_field];    
    if (Lower(dir) == 'right') {
        var from = road[fromright_field];
        var to = road[toright_field];    
    }
    if (from == null || to == null) return null;
    var val = percentAlong * (to - from);
    var addrNum = 0;
    
    if ((Floor(val) % 2) == 0) addrNum = Floor(val);
    else if ((Ceil(val) % 2) == 0) addrNum = Ceil(val);
    else addrNum = Floor(val) - 1;
    
    return from + addrNum;
}

If (!HasKey($feature, id_field)) return;
var id = $feature[id_field];

// Get the geometry of the feature
var geom = Geometry($feature);

// Get the distance and direction defined in the address point feature template/
// If none specified defaults to 0 and Left
var dist = 0;
if ($feature[offdist_field] != null) dist = $feature[offdist_field];
var dir = 'Left';
if ($feature[offdir_field] != null) dir = $feature[offdir_field]; 
if (Lower(dir) == 'right') dist *= -1

// Get the number of site address points and increment value from the address point feature template
// Defaults to 1 and 0 respectively
var numpoints = 1;
if ($feature[numpoints_field] != null) numpoints = $feature[numpoints_field];
var increment = 0;
if ($feature[incrementval_field] != null) increment = $feature[incrementval_field];
   
// If not creating any site addresses return
if (numpoints &amp;lt; 1) return;
   
// Find any intersecting roads with the address point
// If no roads intersect, buffer the point to handle cases where point isn't exactly snapped to line and try again
// If no roads intersect the the buffer return an error message and prevent the address point from being created
var intersectingRoads = Intersects(FeatureSetByName($datastore, "RoadCenterline", [fullname_field, fromleft_field, toleft_field, fromright_field, toright_field], true), geom);
if (Count(intersectingRoads) == 0) {
 intersectingRoads = Intersects(FeatureSetByName($datastore, "RoadCenterline", [fullname_field, fromleft_field, toleft_field, fromright_field, toright_field], true), Buffer(geom, 5));
 if (Count(intersectingRoads) == 0) return { "errorMessage": "Address Point must intersect at least one Road Centerline" }
}
var intersectingRoad = First(intersectingRoads);

// Snap the point to the closest place along the line and find the segment it intersects and the distance along the line
var data = closestPointInfo(geom, Geometry(intersectingRoad));
var closest_point = createPoint(data["coordinates"], Geometry($feature)["spatialReference"])
var results = intersectDistanceAlong(closest_point, intersectingRoad)
var twoPtSegment = results[0];
var distanceAlongLine = results[1];

// Construct a new point geometry offset perpendicularly from the road
var xy = offsetPoint(twoPtSegment.paths[0][0], twoPtSegment.paths[0][1], geom, dist)
var newPoint = Point({ 'x' : xy[0], 'y' : xy[1], 'z' : 0, 'spatialReference' : geom.spatialReference });

// Get the new address number of the site address point based on the distance along the road and direction of the offset
var percentAlong = distanceAlongLine / Length(intersectingRoad);
var addrnum = getAddrNum(intersectingRoad, percentAlong, dir)

// 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&amp;lt;numpoints; i++) {
 Push(adds, {
    'attributes': Dictionary(id_field, id, status_field, defaultstatus, 
                             addrnum_field, addrnum, roadfullname_field, intersectingRoad[fullname_field],
                             addrcapturemeth_field, $feature[capturemeth_field]),
    'geometry': newPoint
   })
 addrNum += increment;
}

// Create new site address points
return {
    'edit': [{
        'className': "SiteAddressPoint",
        'adds': adds
    }]
}&lt;/LI-CODE&gt;&lt;P&gt;At line 18, I'd like to add these variables which reference columns of my attribute table for the Site Address Points:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var predir_field ="predir";
var streetname_field ="streetname";
var sufdir_field ="sufdir";
var suftype_field ="suftype";
var unittype_field ="unittype";&lt;/LI-CODE&gt;&lt;P&gt;And then update line 229 to have them auto-populated per site point, like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// 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&amp;lt;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;
}&lt;/LI-CODE&gt;&lt;P&gt;Now I am not getting an error, which originally was: Arcade object not found (predir). However, the fields in the attributes are not populating with the information requested when I create the site address point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Sep 2023 19:33:08 GMT</pubDate>
    <dc:creator>masslc</dc:creator>
    <dc:date>2023-09-21T19:33:08Z</dc:date>
    <item>
      <title>Address Database Management Solution Object Not Found Error for new variables</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331201#M1123</link>
      <description>&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, here are the variables I would like to add under the "Define the Site Address fields" portion of the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;// 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";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the original vs updated code I have tried to use to populate these fields&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// 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&amp;lt;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&amp;lt;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;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any ideas as to what I am doing wrong here?&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/74321"&gt;@ChrisFox&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 19:34:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331201#M1123</guid>
      <dc:creator>masslc</dc:creator>
      <dc:date>2023-09-21T19:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Address Database Management Solution Object Not Found Error for new variables</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331213#M1124</link>
      <description>&lt;P&gt;Have you defined "unittype" further up in the code? Might help if we can see the whole attribute rule and screen shot of the error.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 18:22:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331213#M1124</guid>
      <dc:creator>TedHoward2</dc:creator>
      <dc:date>2023-09-21T18:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Address Database Management Solution Object Not Found Error for new variables</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331235#M1125</link>
      <description>&lt;P&gt;So the first thing that gives me the error pertains to variable predir. Here is the original full code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;// This rule will create a new site address point when an address point is created along a road
// The site address point will be offset from the road by the distance and direction defined in the address point feature template

// Define the Address Points fields
var id_field = "addressptid";
var offdist_field = "offdist";
var offdir_field = "offdir";
var numpoints_field = "numpoints";
var incrementval_field = "incrementval";
var capturemeth_field = "capturemeth";

// Define the Site Addresses fields
var addressptid_field = "addressptid";
var addrnum_field = "addrnum";
var roadfullname_field = "fullname";
var status_field = "status";
var defaultstatus = "Pending";
var addrcapturemeth_field = "capturemeth";

// Define the Road Centerline fields
var fromleft_field = "fromleft";
var fromright_field = "fromright";
var toleft_field = "toleft";
var toright_field = "toright";
var fullname_field = "fullname";

// This function will return the new point offset perpendicularly from a 2-point line segment at a specified distance
// Positive distance is to the left of the line. Negative distance is to the right of the line 
function offsetPoint(firstPoint, secondPoint, fromPoint, dist) {
    var x1 = firstPoint.x;
    var y1 = firstPoint.y;
    var x2 = secondPoint.x;
    var y2 = secondPoint.y;
    var x3 = fromPoint.x;
    var y3 = fromPoint.y;

    var a = y1 - y2;
    var b = x2 - x1;

    var norm = Sqrt(a*a + b*b);
    a = a / norm;
    b = b / norm;

    return [x3 + a * dist, y3 + b * dist]
}

// This function will find the closest point on line_feature from point_feature
function closestPointInfo(point_feature, line_feature) {
    var vertices = line_feature["paths"]
    var x = point_feature["x"];
    var y = point_feature["y"];

    // Loop through each part of the geometry and each segment, tracking the shortest distance
    var shortest = [1e10];
    for (var i in vertices) {
        var part = vertices[i];
        var previous = part[0];
        for (var j = 1; j &amp;lt; Count(part); j++) {
            var current = part[j];
            var result = pDistance(x, y, previous["x"], previous["y"], current["x"], current["y"]);
            if (result[0] &amp;lt; shortest[0]) shortest = result
            previous = current;
        }

    }

    // Couldn't find anything
    if (Count(shortest) == 1) return null

    return {"distance": shortest[0],
            "coordinates": shortest[1],
            "isVertex": shortest[2],
            "lineSide": shortest[3]}
}

// This function will get distance between 2 points
function pDistance(x, y, x1, y1, x2, y2) {
  var A = x - x1;
  var B = y - y1;
  var C = x2 - x1;
  var D = y2 - y1;

  var dot = A * C + B * D;
  var len_sq = C * C + D * D;
  var param = -1;
  if (len_sq != 0) //in case of 0 length line
      param = dot / len_sq;

  var xx, yy;
  var is_vertex = true;
  if (param &amp;lt; 0) {
    xx = x1;
    yy = y1;
  }
  else if (param &amp;gt; 1) {
    xx = x2;
    yy = y2;
  }
  else {
    is_vertex = false;
    xx = x1 + param * C;
    yy = y1 + param * D;
  }

  var dx = x - xx;
  var dy = y - yy;
  return [Sqrt(dx * dx + dy * dy), [xx, yy], is_vertex, sideOfLine(x,y,x1,y1,x2,y2)];
}

// This function will get side of line segment that a point (x, y) is on based on the direction of segment [[x1, y1], [x2, y2]]
function sideOfLine(x, y, x1, y1, x2, y2) {

    var d = (x - x1) * (y2 - y1) - (y - y1) * (x2 - x1)
    if (d &amp;lt; 0) {
        return 'Left'
    } else if (d &amp;gt; 0) {
        return 'Right'
    } else {
        return null
    }
}

// This function will create point geometry from coordinates [x, y]
function createPoint(coordinates, spatial_ref) {    
    return Point({"x": coordinates[0], "y": coordinates[1], "z" : 0, "spatialReference": spatial_ref})
}

// This function will return the segment intersected and the distance along the line
function intersectDistanceAlong(sourceGeometry, interestedLine){
    var distanceAlongLine = 0;
    // Loop through the segments of the line. Handle multipart geometries
    for (var part in Geometry(interestedLine).paths) {
        var segment = Geometry(interestedLine).paths[part];

        // Loop through the points in the segment
        for (var i in segment) {
            if (i == 0) continue;

            // Construct a 2-point line segment from the current and previous point
            var firstPoint = segment[i-1];
            var secondPoint = segment[i]
            var twoPointLine = Polyline({ 'paths' : [[[firstPoint.x, firstPoint.y], [secondPoint.x, secondPoint.y]]], 'spatialReference' : firstPoint.spatialReference});

            // Test if the  point intersects the 2-point line segment
            if (Intersects(sourceGeometry, twoPointLine)) {
                // Construct a 2-point line segment using the previous point and the address point
                var lastSegment = Polyline({ 'paths' : [[[firstPoint.x, firstPoint.y], [sourceGeometry.x, sourceGeometry.y]]], 'spatialReference' : firstPoint.spatialReference});
                // Add to the total distance along the line and break the loop
                distanceAlongLine += Length(lastSegment);
                return [twoPointLine, distanceAlongLine]
            }
            // Add to the toal distance along the line
            distanceAlongLine += Length(twoPointLine);
        }
    }
    return null;
}

// This function will return the address number of the new site address point
// It determines this based on the from and to address range on the intersecting road and the direction of the offset
function getAddrNum(road, percentAlong, dir) {
    var addrNum = null;
    var from = road[fromleft_field];
    var to = road[toleft_field];    
    if (Lower(dir) == 'right') {
        var from = road[fromright_field];
        var to = road[toright_field];    
    }
    if (from == null || to == null) return null;
    var val = percentAlong * (to - from);
    var addrNum = 0;
    
    if ((Floor(val) % 2) == 0) addrNum = Floor(val);
    else if ((Ceil(val) % 2) == 0) addrNum = Ceil(val);
    else addrNum = Floor(val) - 1;
    
    return from + addrNum;
}

If (!HasKey($feature, id_field)) return;
var id = $feature[id_field];

// Get the geometry of the feature
var geom = Geometry($feature);

// Get the distance and direction defined in the address point feature template/
// If none specified defaults to 0 and Left
var dist = 0;
if ($feature[offdist_field] != null) dist = $feature[offdist_field];
var dir = 'Left';
if ($feature[offdir_field] != null) dir = $feature[offdir_field]; 
if (Lower(dir) == 'right') dist *= -1

// Get the number of site address points and increment value from the address point feature template
// Defaults to 1 and 0 respectively
var numpoints = 1;
if ($feature[numpoints_field] != null) numpoints = $feature[numpoints_field];
var increment = 0;
if ($feature[incrementval_field] != null) increment = $feature[incrementval_field];
   
// If not creating any site addresses return
if (numpoints &amp;lt; 1) return;
   
// Find any intersecting roads with the address point
// If no roads intersect, buffer the point to handle cases where point isn't exactly snapped to line and try again
// If no roads intersect the the buffer return an error message and prevent the address point from being created
var intersectingRoads = Intersects(FeatureSetByName($datastore, "RoadCenterline", [fullname_field, fromleft_field, toleft_field, fromright_field, toright_field], true), geom);
if (Count(intersectingRoads) == 0) {
 intersectingRoads = Intersects(FeatureSetByName($datastore, "RoadCenterline", [fullname_field, fromleft_field, toleft_field, fromright_field, toright_field], true), Buffer(geom, 5));
 if (Count(intersectingRoads) == 0) return { "errorMessage": "Address Point must intersect at least one Road Centerline" }
}
var intersectingRoad = First(intersectingRoads);

// Snap the point to the closest place along the line and find the segment it intersects and the distance along the line
var data = closestPointInfo(geom, Geometry(intersectingRoad));
var closest_point = createPoint(data["coordinates"], Geometry($feature)["spatialReference"])
var results = intersectDistanceAlong(closest_point, intersectingRoad)
var twoPtSegment = results[0];
var distanceAlongLine = results[1];

// Construct a new point geometry offset perpendicularly from the road
var xy = offsetPoint(twoPtSegment.paths[0][0], twoPtSegment.paths[0][1], geom, dist)
var newPoint = Point({ 'x' : xy[0], 'y' : xy[1], 'z' : 0, 'spatialReference' : geom.spatialReference });

// Get the new address number of the site address point based on the distance along the road and direction of the offset
var percentAlong = distanceAlongLine / Length(intersectingRoad);
var addrnum = getAddrNum(intersectingRoad, percentAlong, dir)

// 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&amp;lt;numpoints; i++) {
 Push(adds, {
    'attributes': Dictionary(id_field, id, status_field, defaultstatus, 
                             addrnum_field, addrnum, roadfullname_field, intersectingRoad[fullname_field],
                             addrcapturemeth_field, $feature[capturemeth_field]),
    'geometry': newPoint
   })
 addrNum += increment;
}

// Create new site address points
return {
    'edit': [{
        'className': "SiteAddressPoint",
        'adds': adds
    }]
}&lt;/LI-CODE&gt;&lt;P&gt;At line 18, I'd like to add these variables which reference columns of my attribute table for the Site Address Points:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var predir_field ="predir";
var streetname_field ="streetname";
var sufdir_field ="sufdir";
var suftype_field ="suftype";
var unittype_field ="unittype";&lt;/LI-CODE&gt;&lt;P&gt;And then update line 229 to have them auto-populated per site point, like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// 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&amp;lt;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;
}&lt;/LI-CODE&gt;&lt;P&gt;Now I am not getting an error, which originally was: Arcade object not found (predir). However, the fields in the attributes are not populating with the information requested when I create the site address point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 19:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331235#M1125</guid>
      <dc:creator>masslc</dc:creator>
      <dc:date>2023-09-21T19:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Address Database Management Solution Object Not Found Error for new variables</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331248#M1126</link>
      <description>&lt;P&gt;the last code snippet in your last post (10 lines long) may have variables that have not been defined from what I can tell&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TedHoward2_0-1695326366554.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81334i9DD45F17443E74F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TedHoward2_0-1695326366554.png" alt="TedHoward2_0-1695326366554.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;predir is not a defined variable - just a guess that it should be "intersectingRoad[predir_field]"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TedHoward2_1-1695326429103.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81335iB70F68BCCCC21B2E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TedHoward2_1-1695326429103.png" alt="TedHoward2_1-1695326429103.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;unittype is not a defined variable - best guess is that is should be "intersectingRoad[unittype_field]":&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 20:02:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331248#M1126</guid>
      <dc:creator>TedHoward2</dc:creator>
      <dc:date>2023-09-21T20:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Address Database Management Solution Object Not Found Error for new variables</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331257#M1127</link>
      <description>&lt;P&gt;Thanks for spotting that, I updated those and got my original error again, attached below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="masslc_0-1695327841509.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81337i0FB43CA29D634C23/image-size/medium?v=v2&amp;amp;px=400" role="button" title="masslc_0-1695327841509.png" alt="masslc_0-1695327841509.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 20:24:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331257#M1127</guid>
      <dc:creator>masslc</dc:creator>
      <dc:date>2023-09-21T20:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Address Database Management Solution Object Not Found Error for new variables</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331279#M1128</link>
      <description>&lt;P&gt;I think you need to reference how the&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/function-reference/dictionary_functions/#dictionary1" target="_self"&gt;Dictionary&lt;/A&gt;&amp;nbsp;function works in Arcade. The rule builds the attributes payload using this function and you need to provide the field name followed by a value that you want inserted into that field. The value has to come from somewhere.&lt;/P&gt;&lt;P&gt;If intersectingRoad featureset does not have a field named "predir", then I would expect that error. Is it supposed to come from $feature? It's unclear what you are trying to do.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 21:32:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/address-database-management-solution-object-not/m-p/1331279#M1128</guid>
      <dc:creator>TedHoward2</dc:creator>
      <dc:date>2023-09-21T21:32:55Z</dc:date>
    </item>
  </channel>
</rss>

