<?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: Intersect arcade expressions for calculating fields and symbology based on intersects between two layers in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expressions-for-calculating/m-p/1016077#M37981</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/54030"&gt;@DataOfficer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Q:&lt;/STRONG&gt; Is there any way to &lt;STRONG&gt;calculate the field of an attribute table&lt;/STRONG&gt; based on an arcade expression for the intersect of two layers?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A:&lt;/STRONG&gt;&amp;nbsp;Yes, if the data is stored in the same datastore and you are using $datastore in the Arcade expression ($map is not supported in the Field Calculation profile)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Q:&lt;/STRONG&gt; Is there any way to &lt;STRONG&gt;define the symbology&lt;/STRONG&gt; based on an arcade expression for the intersect of two layers?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A:&lt;/STRONG&gt; No, the symbology profile does not provide access to other features and featuresets. You can however, calculate a field based on other features and featuresets and define the symbology on that newly created field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jan 2021 19:13:13 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2021-01-12T19:13:13Z</dc:date>
    <item>
      <title>Intersect arcade expressions for calculating fields and symbology based on intersects between two layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expressions-for-calculating/m-p/1014376#M37922</link>
      <description>&lt;P&gt;Is there any way to calculate the field of an attribute table, or symbology based on an arcade expression for the intersect of two layers? A point layer and a polygon layer in this instance.&lt;BR /&gt;&lt;BR /&gt;I am able to use an Intersects expression in a popup, e.g.:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// get the count for all sites in the grid

var sites = FeatureSetByName($map,"Sites")

var countSites = Count(Intersects(sites,$feature))

return countSites&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;However the expressions available to calculate an attribute table field or symbology do not accept $map during the use of the FeatureSetByName function, giving the following error:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="text-red"&gt;Execution Error:&lt;/SPAN&gt;&lt;SPAN&gt;Runtime Error: Identifier Not Found. $map&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Are there plans for this functionality to be supported in future?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 18:43:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expressions-for-calculating/m-p/1014376#M37922</guid>
      <dc:creator>DataOfficer</dc:creator>
      <dc:date>2021-01-06T18:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Intersect arcade expressions for calculating fields and symbology based on intersects between two layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expressions-for-calculating/m-p/1016077#M37981</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/54030"&gt;@DataOfficer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Q:&lt;/STRONG&gt; Is there any way to &lt;STRONG&gt;calculate the field of an attribute table&lt;/STRONG&gt; based on an arcade expression for the intersect of two layers?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A:&lt;/STRONG&gt;&amp;nbsp;Yes, if the data is stored in the same datastore and you are using $datastore in the Arcade expression ($map is not supported in the Field Calculation profile)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Q:&lt;/STRONG&gt; Is there any way to &lt;STRONG&gt;define the symbology&lt;/STRONG&gt; based on an arcade expression for the intersect of two layers?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A:&lt;/STRONG&gt; No, the symbology profile does not provide access to other features and featuresets. You can however, calculate a field based on other features and featuresets and define the symbology on that newly created field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 19:13:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expressions-for-calculating/m-p/1016077#M37981</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-01-12T19:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Intersect arcade expressions for calculating fields and symbology based on intersects between two layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expressions-for-calculating/m-p/1016313#M37990</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;,&lt;BR /&gt;That's fantastic, thank you for the in-depth response. I will give it a try via the $datastore route.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 12:51:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expressions-for-calculating/m-p/1016313#M37990</guid>
      <dc:creator>DataOfficer</dc:creator>
      <dc:date>2021-01-13T12:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Intersect arcade expressions for calculating fields and symbology based on intersects between two layers</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expressions-for-calculating/m-p/1140586#M44147</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/54030"&gt;@DataOfficer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the $datastore recommendation it works perfectly!&lt;/P&gt;&lt;P&gt;Thought I'd leave a pic and some sample code for those that follow. I know it always helps me. The sample gets intersecting zip code values from a zip code layer (polygon) and calculates a Zip Code field for a law enforcement beats layer (polygon). If there is more than one intersecting zip code it will calculate the zip codes additional values with a coma separator.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var intersectZIP = Intersects(FeatureSetByName($datastore,"Zip_Codes"),$Feature)
var zip = "";
for (var f in intersectZIP) {
    if (zip == "") {
        zip =(f.ZIPCODE);
    } else {
        zip += ", "+(f.ZIPCODE);            
    }
}
return zip;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 22:03:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/intersect-arcade-expressions-for-calculating/m-p/1140586#M44147</guid>
      <dc:creator>NedCake1</dc:creator>
      <dc:date>2022-02-03T22:03:59Z</dc:date>
    </item>
  </channel>
</rss>

