<?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: Having problems using arcade to Field Calculate values only at intersection of two layers in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296769#M69970</link>
    <description>&lt;P&gt;There is a caveat to this, the features must be in the same Feature dataset/Set. That is why I was able to call $datastore on it. Field Calculate has it's own profile restrictions and will only work with $feature or $datastore. $feature was what I was working in and needed to use Field Calculate on, but I needed to access another feature class within the same Feature Dataset and used $datastore to access it.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2023 16:36:23 GMT</pubDate>
    <dc:creator>DaleJackan_work</dc:creator>
    <dc:date>2023-06-07T16:36:23Z</dc:date>
    <item>
      <title>Having problems using arcade to Field Calculate values only at intersection of two layers</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296483#M69929</link>
      <description>&lt;P&gt;&amp;nbsp; I have two layers, &lt;STRONG&gt;zoning&lt;/STRONG&gt; and &lt;STRONG&gt;plans&lt;/STRONG&gt;, and where the polygons intersect I need to copy the &lt;EM&gt;SAP_NAME&lt;/EM&gt;&amp;nbsp;value from &lt;STRONG&gt;plans&lt;/STRONG&gt; and paste it into the &lt;STRONG&gt;zoning&lt;/STRONG&gt; field &lt;EM&gt;plan_names&lt;/EM&gt;. I have found some posts that are similar, but when I try to code the arcade it says valid but never shows any intersection. The two layers are in the same coordinate system and they definitely intersect. Understand that I am using Field Calculate so I am not specifying in code the values need to go into zoning.plan_names because it's already specified in the tool&amp;nbsp; Some of the variations in code I have used are as follows:&lt;/P&gt;&lt;P&gt;var plan= FeatureSetByName($datastore, "county_editors.GISL.Plan")&lt;BR /&gt;var intersect= Intersects(plan,$feature)&lt;BR /&gt;for (var i in intersect){&lt;BR /&gt;if(i==true){plan.SAP_Name}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var zoning=FeatureSetByName($datastore, "county_editors.GISL.Zoning")&lt;BR /&gt;var geom_zoning= Geometry(zoning)&lt;BR /&gt;var plan= FeatureSetByName($datastore, "county_editors.GISL.Plan")&lt;BR /&gt;var geom_plan= Geometry(plan)&lt;BR /&gt;IIf(Intersects(geom_zoning, geom_plan), plan.SAP_NAME,'')&lt;/P&gt;&lt;P&gt;None of these appear to show any intersection between the layers when there definitely is. Thank you for any help you can provide.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Dale Jackan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 20:58:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296483#M69929</guid>
      <dc:creator>DaleJackan_work</dc:creator>
      <dc:date>2023-06-06T20:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems using arcade to Field Calculate values only at intersection of two layers</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296657#M69952</link>
      <description>&lt;P&gt;The &lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/#intersects" target="_self"&gt;Intersects&lt;/A&gt; function evaluates two individual geometries, not an entire FeatureSet. What you have to do is &lt;A href="https://developers.arcgis.com/arcade/guide/loops/#featureset" target="_self"&gt;loop&lt;/A&gt; through the plans FeatureSet and see if each feature intersects with the zone feature.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var plan = FeatureSetByName($datastore, "county_editors.GISL.Plan")
for (var f in plan){
  if(Intersects(f, $feature)){plan.SAP_Name}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 13:37:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296657#M69952</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-06-07T13:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems using arcade to Field Calculate values only at intersection of two layers</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296675#M69959</link>
      <description>&lt;P&gt;Just to follow up I figured out the solution. My issue was that I misread the documentation and thought you had to call Geometry() in order to make it available and instead, it wasn't available. I also thought the Calculate Field tool handled the looping and it doesn't.:&lt;/P&gt;&lt;P&gt;var small_area= FeatureSetByName($datastore,"county_editors.GISL.Plan",['*'], true)&lt;/P&gt;&lt;P&gt;for (var i in (Intersects(small_area, $feature))){&lt;BR /&gt;return i.SAP_NAME&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 14:20:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296675#M69959</guid>
      <dc:creator>DaleJackan_work</dc:creator>
      <dc:date>2023-06-07T14:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems using arcade to Field Calculate values only at intersection of two layers</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296681#M69962</link>
      <description>&lt;P&gt;Yes, I thought that part of the code was unnecessary because I thought the Calculate Field tool handled the looping for you, but I was obviously wrong on that point.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 14:19:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296681#M69962</guid>
      <dc:creator>DaleJackan_work</dc:creator>
      <dc:date>2023-06-07T14:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems using arcade to Field Calculate values only at intersection of two layers</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296689#M69963</link>
      <description>&lt;P&gt;And I'm learning something new also! I didn't think it would work properly on a FeatureSet like that.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 14:36:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296689#M69963</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-06-07T14:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems using arcade to Field Calculate values only at intersection of two layers</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296769#M69970</link>
      <description>&lt;P&gt;There is a caveat to this, the features must be in the same Feature dataset/Set. That is why I was able to call $datastore on it. Field Calculate has it's own profile restrictions and will only work with $feature or $datastore. $feature was what I was working in and needed to use Field Calculate on, but I needed to access another feature class within the same Feature Dataset and used $datastore to access it.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 16:36:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/having-problems-using-arcade-to-field-calculate/m-p/1296769#M69970</guid>
      <dc:creator>DaleJackan_work</dc:creator>
      <dc:date>2023-06-07T16:36:23Z</dc:date>
    </item>
  </channel>
</rss>

