Hello!
Looking for some assistance on what I need to do to make an arcade expression work and apply an attribute rule to a feature class. What I have are two feature classes. One is an address point layer and the other is a postal code polygon layer. The address point file has a field called "POSTAL_CODE". The Postal Code polygon layer have two fields that make up the Postal Code. The two fields are "LDU" and "FSA". I want the "POSTAL_CODE" field in the address point layer to be updated with the "FSA" and the "LDU" values of the intersecting postal code polygon. It should be formatted in the POSTAL_CODE field as "FSA" + " " + "LDU", so that there is a space between the two values. e.g. here is a valid postal code = "L1N 0B7". The code I have so far is seen below. The error I'm getting is on "line 11. Semicolon or new line expected." I'm having trouble troubleshooting this one and could use some advice! Thanks!
var LDUvalue = FeatureSetByName($datastore, "ADDR_Postal_Code_Boundaries", ["LDU"], false);
var FSAvalue = FeatureSetByName($datastore, "ADDR_Postal_Code_Boundaries", ["FSA"], false);
var intersectLayer = Intersects(FSAvalue, $feature);
var cnt = Count(intersectLayer);
var result = Null;
if (cnt > 0) {
var layer = First(intersectLayer);
if (layer != null) {
result = layer.Get("FSA") + " " + layer.Get("LDU");
}
}
return result;