<?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: Attribute Rule Arcade Intersect and Copy Attribute from Feature A to B Error: Indexable type expected in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-arcade-intersect-and-copy-attribute/m-p/1540305#M88429</link>
    <description>&lt;P&gt;Line 10 should be&lt;/P&gt;&lt;LI-CODE lang="c"&gt;return firstPoly.ABC;&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 19 Sep 2024 13:00:17 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2024-09-19T13:00:17Z</dc:date>
    <item>
      <title>Attribute Rule Arcade Intersect and Copy Attribute from Feature A to B Error: Indexable type expected</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-arcade-intersect-and-copy-attribute/m-p/1539978#M88387</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;Hope all is well, so i need some Arcade help&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Let's say I have a point feature class which is empty and will be digitized via Field Maps.&lt;/LI&gt;&lt;LI&gt;The map will also contain a polygon layer ,and one of its attribute is say "&lt;EM&gt;attribute_ABC&lt;/EM&gt;" and has values.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The point layer will also have attribute "&lt;EM&gt;attribute_ABC&lt;/EM&gt;" which would initially be empty, so i am trying to create an attribute rule for it.&lt;/LI&gt;&lt;LI&gt;whenever the point intersects the polygon layer, it copies the respective &lt;EM&gt;attribute_ABC&lt;/EM&gt; value from the polygon layer to the point layer &lt;EM&gt;attribute_ABC&lt;/EM&gt;.&lt;/LI&gt;&lt;LI&gt;Basically the idea is to auto populate some of the attributes of the point feature class from other existing layers based on their intersection.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So I finally got the code working to the point that code block says that "Expression is valid" but when I try to add a point to the map, I get the following error&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Failed to create Pt.
Failed to evaluate Arcade expression. [
Rule name: Poly,
Triggering event: Insert,
Class name: Pt,
GlobalID: {4E52CA0C-099D-4593-80AF-292A5CFE51CF},
Arcade error: Indexable type expected,
Script line: 11]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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, "poly");

// Intersect
var int = Intersects(poly, $feature);

// Check if there is an intersection
if (Count(int) &amp;gt; 0) {
// Get the first intersecting polygon's ABC value
   var firstPoly = First(int);
   return int.ABC;
 } else {
// if there's no intersection then retain the original ABC value or return null
   return $feature.ABC;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS the map is being created in Pro 3.3.1 which will then published to AGOL and then that map will be used in Field Maps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 21:49:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-arcade-intersect-and-copy-attribute/m-p/1539978#M88387</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2024-09-18T21:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule Arcade Intersect and Copy Attribute from Feature A to B</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-arcade-intersect-and-copy-attribute/m-p/1540167#M88413</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;can any of you you please help?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 21:24:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-arcade-intersect-and-copy-attribute/m-p/1540167#M88413</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2024-09-18T21:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule Arcade Intersect and Copy Attribute from Feature A to B Error: Indexable type expected</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-arcade-intersect-and-copy-attribute/m-p/1540305#M88429</link>
      <description>&lt;P&gt;Line 10 should be&lt;/P&gt;&lt;LI-CODE lang="c"&gt;return firstPoly.ABC;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 19 Sep 2024 13:00:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-arcade-intersect-and-copy-attribute/m-p/1540305#M88429</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-09-19T13:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule Arcade Intersect and Copy Attribute from Feature A to B Error: Indexable type expected</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-arcade-intersect-and-copy-attribute/m-p/1540406#M88436</link>
      <description>&lt;P&gt;Good morning Ken, hope all is well&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Yup that did it, thank you so much and have a great day!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 14:57:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-arcade-intersect-and-copy-attribute/m-p/1540406#M88436</guid>
      <dc:creator>Ed_</dc:creator>
      <dc:date>2024-09-19T14:57:35Z</dc:date>
    </item>
  </channel>
</rss>

