<?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 works in one map, not in another. Error with $map? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1688632#M68072</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/103091"&gt;@MattCotterill&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are all your inputs and variables correctly spelt and you have looked for any case sensitivities?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Mar 2026 11:35:19 GMT</pubDate>
    <dc:creator>DanielFox1</dc:creator>
    <dc:date>2026-03-05T11:35:19Z</dc:date>
    <item>
      <title>Arcade expression works in one map, not in another. Error with $map?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1688393#M68069</link>
      <description>&lt;P&gt;&lt;STRONG&gt;I'm trying to multiple get address points that are within a parcel to show up in the parcel's pop-up window.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I got the Arcade assistant to generate some code in a simple map I made consisting of only a point and a polygon layer and it worked. When I transfer the code to a much more complicated map that I didn't create, (changing the name of the layer name and field name) I get a text execution error.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here's the code that works:&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// get addresses from RPP_Addresses layer from field 'addresses' that intersect with selected parcel&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;addresses&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Intersects&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$map&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"RPP_Addresses"&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;addressList&lt;/SPAN&gt;&lt;SPAN&gt; = [];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;address&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;addresses&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;Push&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;addressList&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;address&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;FullAddres&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;Concatenate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;addressList&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;", "&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;This code does not:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// get addresses from Addresses layer from field 'AddressLoo' that intersect with selected parcel&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;addresses&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Intersects&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$map&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Addresses"&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;addressList&lt;/SPAN&gt;&lt;SPAN&gt; = [];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;address&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;addresses&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;Push&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;addressList&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;address&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;AddressLoo&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;Concatenate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;addressList&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;", "&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;This is the error message I get:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Test execution error: Compilation error - Line : 2, 44: Identifier not recognized. Verify test data.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;In the bad code, the $map in Line 2, position 44 is underlined in red&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Both point and polygon layers are in different layer groups and I can't seem to drag them out, but I can't imagine that would be the problem&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Mar 2026 16:32:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1688393#M68069</guid>
      <dc:creator>MattCotterill</dc:creator>
      <dc:date>2026-03-04T16:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression works in one map, not in another. Error with $map?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1688632#M68072</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/103091"&gt;@MattCotterill&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are all your inputs and variables correctly spelt and you have looked for any case sensitivities?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 11:35:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1688632#M68072</guid>
      <dc:creator>DanielFox1</dc:creator>
      <dc:date>2026-03-05T11:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression works in one map, not in another. Error with $map?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1688673#M68075</link>
      <description>&lt;P&gt;If I misname the address points layer in the good code, I get a different error, and no red underline under the $map. The main problem here seems to be the $map part.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 16:05:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1688673#M68075</guid>
      <dc:creator>MattCotterill</dc:creator>
      <dc:date>2026-03-05T16:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression works in one map, not in another. Error with $map?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1688708#M68077</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/103091"&gt;@MattCotterill&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking at your screenshots, it looks like the $map profile variable is not valid in this scenario. When you look at the Profile variables panel in the editor, do you see $map alongside $feature and $layer?&lt;/P&gt;&lt;P&gt;I have a suspicion that you may be trying to author the expression on a Map Image Layer sublayer (and not a hosted feature layer). For Map Image Layer sublayers, the $map profile variable is not supported/populated.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 17:52:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1688708#M68077</guid>
      <dc:creator>timcneil</dc:creator>
      <dc:date>2026-03-05T17:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression works in one map, not in another. Error with $map?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1688835#M68088</link>
      <description>&lt;P&gt;It is definitely an issue with the profile variable. Like&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/512339"&gt;@timcneil&lt;/a&gt;&amp;nbsp;said, the &lt;STRONG&gt;$map&lt;/STRONG&gt; profile variable is not available in all profiles. And it may not be obvious what profile you are using.&lt;/P&gt;&lt;P&gt;This concept caught me off guard and I asked the same question:&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/using-featuresetbyname-map-identifier-not/m-p/1587152" target="_blank" rel="noopener"&gt;Solved: Using FeatureSetByName() $map identifier not recog... - Esri Community&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This link was provided to me that shows there are many different Arcade profiles, and they don't all share the same profile variables:&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/arcade/profiles/" target="_blank" rel="noopener"&gt;Profile overview | ArcGIS Arcade | Esri Developer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 22:28:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1688835#M68088</guid>
      <dc:creator>JasonBennett</dc:creator>
      <dc:date>2026-03-05T22:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression works in one map, not in another. Error with $map?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1690313#M68178</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/177716"&gt;@JasonBennett&lt;/a&gt;&amp;nbsp;Did you mark&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/512339"&gt;@timcneil&lt;/a&gt;&amp;nbsp;post as the answer because you are using Map Image layer sublayer.&lt;/P&gt;&lt;P&gt;By your reply, it seems like you are calling it an issue with the profile not having the $map variable.&lt;/P&gt;&lt;P&gt;But, original post says you are using a popup window and 'breaks' when you change the layer name(s).&lt;/P&gt;&lt;P&gt;I ask, as if not related to Map Image layer, the same $map variable should be available in the popup profile regardless of the map.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 19:33:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-works-in-one-map-not-in-another/m-p/1690313#M68178</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2026-03-12T19:33:12Z</dc:date>
    </item>
  </channel>
</rss>

