<?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: $map not recognised in ArcGIS QuickCapture Questions</title>
    <link>https://community.esri.com/t5/arcgis-quickcapture-questions/arcade-expression-map-not-recognised/m-p/1585930#M1389</link>
    <description>&lt;P&gt;FYI this has been solved. Case closed!&lt;/P&gt;</description>
    <pubDate>Mon, 17 Feb 2025 02:37:11 GMT</pubDate>
    <dc:creator>FrankHerbert</dc:creator>
    <dc:date>2025-02-17T02:37:11Z</dc:date>
    <item>
      <title>Arcade expression: $map not recognised</title>
      <link>https://community.esri.com/t5/arcgis-quickcapture-questions/arcade-expression-map-not-recognised/m-p/1585157#M1387</link>
      <description>&lt;P&gt;I'm getting a new error message that has never happened before. Please help!&lt;/P&gt;&lt;P&gt;In January 2025, I published a QuickCapture project for &lt;STRONG&gt;offline&lt;/STRONG&gt; use. The user carries out a brief survey, and the new point feature is intersected with a vector polygon layer from the project MMPK. The vector polygon layer is very simple - just five regions covering the country, and the name of the intersecting region is passed to the new point feature. Here is the expression:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;regions&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;"Regions"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;FONT color="#808080"&gt;&lt;SPAN&gt;// Filter the features where 'Type' is 'Ops'&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;filteredRegions&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Filter&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;regions&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;"Type = 'Ops'"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;FONT color="#808080"&gt;&lt;SPAN&gt;// Find intersections with the filtered feature set&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;GEOGRAB&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;$feature&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;filteredRegions&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Count&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;GEOGRAB&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;==&lt;/SPAN&gt; &lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;Text&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;First&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;GEOGRAB&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;SPAN&gt;Region&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;}&lt;/SPAN&gt; &lt;SPAN&gt;else&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;"NA"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I was able to publish the project, and it still works to this day in the field. I am trying to replicate the process for a separate project and that's when I noticed I couldn't publish the expression. I receive this error message:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;Test execution error: Compilation error - Line : 1, 31: Identifier not recognized. Verify test data.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;So there's is something wrong with the $map identifier, but I'm not sure what it is.&lt;BR /&gt;It might be worth mentioning, to publish the expression last month, I needed to use a dummy web map that was a replica of the MMPK. This allowed me to publish the expression and subsequently swap out the web map for the MMPK. This is a know bug to ESRI hence why I used this workaround.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Perhaps ESRI have released an update that will not let me publish the expression... I'm not sure. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any help/advice would be appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 Feb 2025 21:17:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-quickcapture-questions/arcade-expression-map-not-recognised/m-p/1585157#M1387</guid>
      <dc:creator>FrankHerbert</dc:creator>
      <dc:date>2025-02-13T21:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression: $map not recognised</title>
      <link>https://community.esri.com/t5/arcgis-quickcapture-questions/arcade-expression-map-not-recognised/m-p/1585930#M1389</link>
      <description>&lt;P&gt;FYI this has been solved. Case closed!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 02:37:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-quickcapture-questions/arcade-expression-map-not-recognised/m-p/1585930#M1389</guid>
      <dc:creator>FrankHerbert</dc:creator>
      <dc:date>2025-02-17T02:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression: $map not recognised</title>
      <link>https://community.esri.com/t5/arcgis-quickcapture-questions/arcade-expression-map-not-recognised/m-p/1587044#M1390</link>
      <description>&lt;P&gt;What happened? I'm having a similar issue.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 17:00:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-quickcapture-questions/arcade-expression-map-not-recognised/m-p/1587044#M1390</guid>
      <dc:creator>JasonBennett</dc:creator>
      <dc:date>2025-02-19T17:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression: $map not recognised</title>
      <link>https://community.esri.com/t5/arcgis-quickcapture-questions/arcade-expression-map-not-recognised/m-p/1587240#M1392</link>
      <description>&lt;P&gt;My issue was related to Arcade Profiles.&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/using-featuresetbyname-map-identifier-not/m-p/1587152#M63704" target="_blank"&gt;Solved: Using FeatureSetByName() $map identifier not recog... - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 21:22:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-quickcapture-questions/arcade-expression-map-not-recognised/m-p/1587240#M1392</guid>
      <dc:creator>JasonBennett</dc:creator>
      <dc:date>2025-02-19T21:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression: $map not recognised</title>
      <link>https://community.esri.com/t5/arcgis-quickcapture-questions/arcade-expression-map-not-recognised/m-p/1587660#M1393</link>
      <description>&lt;P&gt;When you add the project basemap,&amp;nbsp; just make sure to save and then refresh the QC project. Otherwise, QC doesn't seem to realise there's a project basemap containing the layers you want to query. Once you have done this, it will recognise the $map function in the expression and stop throwing out error messages&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 20:31:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-quickcapture-questions/arcade-expression-map-not-recognised/m-p/1587660#M1393</guid>
      <dc:creator>FrankHerbert</dc:creator>
      <dc:date>2025-02-20T20:31:42Z</dc:date>
    </item>
  </channel>
</rss>

