Being new to Arcade and Attribute rules, I am trying to put in place a rule that populates a tax lot ID number on an address point upon insert or update. The error I receive comes from line 6 at the bottom of the thread.
ERROR 002717: Invalid Arcade expression, Arcade error: Table not found WC Tax Lots
What I am having trouble connecting the dots is how to grab the TLNO from the tax lot polygon and assign it to the TLNO GIS field in the address point feature class. In my Contents, the tax lot layer is titled as WC Tax Lots as it is in the code below.
I received the code sample from GitHub - Esri/arcade-expressions: ArcGIS Arcade expression templates for all supported profiles in t...
var intersecting_field = "TLNO GIS";
var feature_field = "TLNO";
var intersecting_featset = FeatureSetByName($datastore, "WC Tax Lots", [intersecting_field], true);
var intersected_feature = First(Intersects(intersecting_featset, $feature));
if (intersected_feature == null)
{
return $feature[feature_field];
}
if (IsEmpty(intersected_feature.valueToCopy))
{
return $feature[feature_field];
}
return intersected_feature[intersecting_field];
Brian