<?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: Pro arcade expression attribute rule in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/pro-arcade-expression-attribute-rule/m-p/1588972#M93389</link>
    <description>&lt;P&gt;Try something like this instead?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var poly = FeatureSetByName($datastore, "pol")
for (var py in poly){
    if (Intersects(py, $feature)){
        return py.GlobalID
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think you need to specify an Else here.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Feb 2025 15:40:20 GMT</pubDate>
    <dc:creator>AlfredBaldenweck</dc:creator>
    <dc:date>2025-02-25T15:40:20Z</dc:date>
    <item>
      <title>Pro arcade expression attribute rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-arcade-expression-attribute-rule/m-p/1588784#M93369</link>
      <description>&lt;P&gt;I am trying to create an attribute rule that will allow me to create a point and take the attributes from a polygon and transfer them to the point when the point is created, if it's possible. in the attribute rules i get, Error002717: invalid arcade expression, Arcade error: Unexpected null&lt;/P&gt;&lt;P&gt;My attribute rule&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// Read the polygon layer
var poly = FeatureSetByName($datastore, "polygons");

// Find intersecting polygon
var int = Intersects(poly, $feature);

// Check if there is an intersection
if (Count(int) &amp;gt; 0) {
    // Get the first intersecting polygon's ParcelID value
    var firstPoly = First(int);
    return firstPoly.ParcelID;
} else {
    // If there's no intersection, retain the existing ParcelID value
    return firstPoly.ParcelID;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 17:47:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-arcade-expression-attribute-rule/m-p/1588784#M93369</guid>
      <dc:creator>2Quiker</dc:creator>
      <dc:date>2025-02-25T17:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Pro arcade expression attribute rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-arcade-expression-attribute-rule/m-p/1588972#M93389</link>
      <description>&lt;P&gt;Try something like this instead?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var poly = FeatureSetByName($datastore, "pol")
for (var py in poly){
    if (Intersects(py, $feature)){
        return py.GlobalID
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think you need to specify an Else here.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 15:40:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-arcade-expression-attribute-rule/m-p/1588972#M93389</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2025-02-25T15:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pro arcade expression attribute rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-arcade-expression-attribute-rule/m-p/1588986#M93391</link>
      <description>&lt;P&gt;Your else statement runs when there are no intersecting polygons, which is why getting the ParcelID from a null value throws an error. Where is the existing account value coming from?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 16:29:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-arcade-expression-attribute-rule/m-p/1588986#M93391</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-02-25T16:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pro arcade expression attribute rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-arcade-expression-attribute-rule/m-p/1589112#M93418</link>
      <description>&lt;P&gt;Using what you posted, I didn't get an error. I have both the polygon and point layer added to my map, when start editing and create the point, the point is created but the ParcelID field is not populated in the point layer. The attribute rule is setup with the following settings, immediate calculation, Field - ParcelID, triggers - both insert &amp;amp; Update.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 19:31:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-arcade-expression-attribute-rule/m-p/1589112#M93418</guid>
      <dc:creator>2Quiker</dc:creator>
      <dc:date>2025-02-25T19:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Pro arcade expression attribute rule</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-arcade-expression-attribute-rule/m-p/1589113#M93419</link>
      <description>&lt;P&gt;account was a typeo, it's should be ParcelID.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 19:58:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-arcade-expression-attribute-rule/m-p/1589113#M93419</guid>
      <dc:creator>2Quiker</dc:creator>
      <dc:date>2025-02-25T19:58:22Z</dc:date>
    </item>
  </channel>
</rss>

