<?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: Arcade Expression Error in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-error/m-p/1567411#M91155</link>
    <description>&lt;P&gt;Pro validates your expression based on a subset of records, so it may not know about potential values elsewhere in your data. Or for a spatial operation, it sees that the expression is valid, but once it tries to perform the steps you wrote, it hits an error.&lt;/P&gt;&lt;P&gt;For intersections, that usually means you've got a feature that does not intersect with anything from your other layer. If you don't have it already, throw in a quick check to make sure that the intersection has features in it.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// your other code here
// let's call the intersection "xs"

var xs = Intersects($feature, someOtherLayer)

// add a check, if there are &amp;gt; 0 features, do what you need
if( Count(xs) &amp;gt; 0 ){
  return First(someOtherLayer)['someAttribute']
} else {
  return 'No Intersecting Feature Found'
}&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 11 Dec 2024 18:08:36 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2024-12-11T18:08:36Z</dc:date>
    <item>
      <title>Arcade Expression Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-error/m-p/1567340#M91151</link>
      <description>&lt;P&gt;Afternoon everyone. I have created an attribute rule that when i update a field in one polygon, it updates the same field in an intersecting polygon. When I check the expression to validate it, it says it is valid. When I run it, I recieve and error message stating,&amp;nbsp; " The index passed was not within the valid range." Any ideas on why this may occur?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 17:21:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-error/m-p/1567340#M91151</guid>
      <dc:creator>PaulMAlexander</dc:creator>
      <dc:date>2024-12-11T17:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-error/m-p/1567347#M91152</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/859939"&gt;@PaulMAlexander&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any chance you could post a screenshot of the rule an error?&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 17:25:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-error/m-p/1567347#M91152</guid>
      <dc:creator>CodyPatterson</dc:creator>
      <dc:date>2024-12-11T17:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-error/m-p/1567411#M91155</link>
      <description>&lt;P&gt;Pro validates your expression based on a subset of records, so it may not know about potential values elsewhere in your data. Or for a spatial operation, it sees that the expression is valid, but once it tries to perform the steps you wrote, it hits an error.&lt;/P&gt;&lt;P&gt;For intersections, that usually means you've got a feature that does not intersect with anything from your other layer. If you don't have it already, throw in a quick check to make sure that the intersection has features in it.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// your other code here
// let's call the intersection "xs"

var xs = Intersects($feature, someOtherLayer)

// add a check, if there are &amp;gt; 0 features, do what you need
if( Count(xs) &amp;gt; 0 ){
  return First(someOtherLayer)['someAttribute']
} else {
  return 'No Intersecting Feature Found'
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 11 Dec 2024 18:08:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-error/m-p/1567411#M91155</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-12-11T18:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-error/m-p/1567563#M91177</link>
      <description>&lt;P&gt;Just a comment on Josh's code.&amp;nbsp; Calling Count and then First results in an extra query.&amp;nbsp; For optimal performance, just call First and check if the result is valid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;
var xs = Intersects($feature, someOtherLayer)
var intersected_feature = First(someOtherLayer)
if (IsEmpty(intersected_feature)){
  return 'No Intersecting Feature Found'
}
return intersected_feature['other_attribute']&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 11 Dec 2024 22:32:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-error/m-p/1567563#M91177</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2024-12-11T22:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-error/m-p/1567763#M91198</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 14:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-error/m-p/1567763#M91198</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-12-12T14:24:08Z</dc:date>
    </item>
  </channel>
</rss>

