<?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: Expression to update Point attribute with attributes of intersecting polygon in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/expression-to-update-point-attribute-with/m-p/1368085#M1236</link>
    <description>&lt;P&gt;Duh! I can see what you mean now! Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jan 2024 20:13:46 GMT</pubDate>
    <dc:creator>JamesBooth</dc:creator>
    <dc:date>2024-01-09T20:13:46Z</dc:date>
    <item>
      <title>Expression to update Point attribute with attributes of intersecting polygon</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/expression-to-update-point-attribute-with/m-p/1368059#M1232</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;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!&lt;/P&gt;&lt;P&gt;var LDUvalue = FeatureSetByName($datastore, "ADDR_Postal_Code_Boundaries", ["LDU"], false);&lt;BR /&gt;var FSAvalue = FeatureSetByName($datastore, "ADDR_Postal_Code_Boundaries", ["FSA"], false);&lt;BR /&gt;var intersectLayer = Intersects(FSAvalue, $feature);&lt;BR /&gt;var cnt = Count(intersectLayer);&lt;/P&gt;&lt;P&gt;var result = Null;&lt;/P&gt;&lt;P&gt;if (cnt &amp;gt; 0) {&lt;BR /&gt;var layer = First(intersectLayer);&lt;BR /&gt;if (layer != null) {&lt;BR /&gt;result = layer.Get("FSA") + " " + layer.Get("LDU");&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return result;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 19:25:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/expression-to-update-point-attribute-with/m-p/1368059#M1232</guid>
      <dc:creator>JamesBooth</dc:creator>
      <dc:date>2024-01-09T19:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to update Point attribute with attributes of intersecting polygon</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/expression-to-update-point-attribute-with/m-p/1368062#M1233</link>
      <description>&lt;P&gt;Line 11 should look like this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;result = layer.FSA + " " + layer.LDU;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 09 Jan 2024 19:42:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/expression-to-update-point-attribute-with/m-p/1368062#M1233</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-01-09T19:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to update Point attribute with attributes of intersecting polygon</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/expression-to-update-point-attribute-with/m-p/1368076#M1234</link>
      <description>&lt;P&gt;That now gives me a different error unfortunately. "Error on line 11. Field not found LDU" I know for a fact that my field is called LDU in the&amp;nbsp;&lt;SPAN&gt;ADDR_Postal_Code_Boundaries feature class. So I'm not sure what's happening exactly. But I appreciate your help!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 20:02:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/expression-to-update-point-attribute-with/m-p/1368076#M1234</guid>
      <dc:creator>JamesBooth</dc:creator>
      <dc:date>2024-01-09T20:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to update Point attribute with attributes of intersecting polygon</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/expression-to-update-point-attribute-with/m-p/1368079#M1235</link>
      <description>&lt;P&gt;When you create the FSAValue layer, you're only including the FSA field and leaving off the LDU field. Give this code a try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var FSAvalue = FeatureSetByName($datastore, "ADDR_Postal_Code_Boundaries", ["FSA", "LDU"], false);
var intersectLayer = Intersects(FSAvalue, $feature);
if (Count(intersectLayer) &amp;gt; 0) {
  var layer = First(intersectLayer);
  if (layer != null) return layer.FSA + " " + layer.LDU;
}
return null;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 09 Jan 2024 20:10:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/expression-to-update-point-attribute-with/m-p/1368079#M1235</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-01-09T20:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to update Point attribute with attributes of intersecting polygon</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/expression-to-update-point-attribute-with/m-p/1368085#M1236</link>
      <description>&lt;P&gt;Duh! I can see what you mean now! Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 20:13:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/expression-to-update-point-attribute-with/m-p/1368085#M1236</guid>
      <dc:creator>JamesBooth</dc:creator>
      <dc:date>2024-01-09T20:13:46Z</dc:date>
    </item>
  </channel>
</rss>

