<?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 query syntax error Unexpected Token in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251757#M23316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kind of, the maximum/dominant value but translating that back to the field name or assigned text name. As I said, I'm still fairly new to Arcade and javascript.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Nov 2017 20:26:12 GMT</pubDate>
    <dc:creator>KieranSmith2</dc:creator>
    <dc:date>2017-11-24T20:26:12Z</dc:date>
    <item>
      <title>Arcade query syntax error Unexpected Token</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251753#M23312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm still fairly new to Arcade and Javascript. I'm trying to write an Arcade script for my pop-up, and am trying to follow the info in this help page&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jshelp/arcade.html" title="https://developers.arcgis.com/javascript/3/jshelp/arcade.html"&gt;Arcade - expression language | Guide | ArcGIS API for JavaScript 3.22&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where it says this:&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="color: #000000; background-color: #fefefe;"&gt;First, write the Arcade expression in a script tag with a unique ID."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #fefefe;"&gt;I then copied the script sample to edit, which starts with the &amp;lt;script&amp;gt; tag. But in Arcade I am getting the error message 'unexpected token' and it looks like Arcade doesn't read any tag like this &amp;lt;&amp;gt;. I've tried to copy whole pieces of javascript headers etc but it always shows that error.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #fefefe;"&gt;Thanks for any help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #fefefe;"&gt;Kieran&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 19:18:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251753#M23312</guid>
      <dc:creator>KieranSmith2</dc:creator>
      <dc:date>2017-11-24T19:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade query syntax error Unexpected Token</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251754#M23313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;Kieran,&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp; Where are you putting the&amp;nbsp;Arcade expression? Are you inside your web map pop up dialog in portal or in your JS html code? Can you share your code for evaluation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 19:44:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251754#M23313</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-11-24T19:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade query syntax error Unexpected Token</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251755#M23314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert&lt;/P&gt;&lt;P&gt;Thanks for the quick reply. I'm doing this directly within AGOL using the Configure Pop-up option. I greyed out the tags so that at least I can show something configured within the popup. This code snippet works as is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//&amp;lt;script type="text/plain" id="education"&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; // store field values in variables with&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; // meaningful names. Each is the total count &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; // of votes for the respective party&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var highSchool = $feature.ECYED2564H;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; var noHiSchool = $feature.ECYED2564N;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; var bachAbove = $feature.V000000046;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; var educLevel = [highSchool, noHiSchool, bachAbove];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Match the maximum value with the label &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; // of the respective field and return it for&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; // use in a UniqueValueRenderer&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;return Decode( Max(educLevel),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; highSchool, 'High School',&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; noHiSchool, 'No High School',&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; bachAbove, 'Bach and Above',&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 'n/a' );&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;//&amp;lt;/script&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Assign the expression to the `valueExpression` property and&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// set up the unique value infos based on the decode values&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// you set up in the expression.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/*&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;var educArcade = document.getElementById("education").text;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var renderer = new UniqueValueRenderer({&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; valueExpression: educArcade,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; valueExpressionTitle: "Dominant Education Level",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; uniqueValueInfos: [{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; value: "highSchool",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; symbol: createSymbol("#00c3ff"),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; label: "High School"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }, {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; value: "noHiSchool",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; symbol: createSymbol("#ff002e"),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; label: "No High School"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }, {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; value: "bachAbove",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; symbol: createSymbol("#faff00"),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; label: "Bach and Above"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;});&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;*/&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 20:01:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251755#M23314</guid>
      <dc:creator>KieranSmith2</dc:creator>
      <dc:date>2017-11-24T20:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade query syntax error Unexpected Token</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251756#M23315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;So you are trying to create a unique value renderer inside a popups arcade expression?...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 20:08:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251756#M23315</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-11-24T20:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade query syntax error Unexpected Token</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251757#M23316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kind of, the maximum/dominant value but translating that back to the field name or assigned text name. As I said, I'm still fairly new to Arcade and javascript.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 20:26:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251757#M23316</guid>
      <dc:creator>KieranSmith2</dc:creator>
      <dc:date>2017-11-24T20:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade query syntax error Unexpected Token</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251758#M23317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;although this is the kind of thing i would aspire to:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=smartmapping_predominance" title="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=smartmapping_predominance"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 20:28:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251758#M23317</guid>
      <dc:creator>KieranSmith2</dc:creator>
      <dc:date>2017-11-24T20:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade query syntax error Unexpected Token</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251759#M23318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Kieran,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; So Arcade in a popup is mainly for math and logical evaluation of field values. You are looking at examples of Arcade in JS code that has a broader capabilities like adjusting renderers and other complex things.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Nov 2017 02:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251759#M23318</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-11-25T02:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade query syntax error Unexpected Token</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251760#M23319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Robert, obviously I didn't get the distinction that Arcade is also used within JS code. Looks like that's where I need to explore further.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2017 01:50:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcade-query-syntax-error-unexpected-token/m-p/251760#M23319</guid>
      <dc:creator>KieranSmith2</dc:creator>
      <dc:date>2017-11-28T01:50:35Z</dc:date>
    </item>
  </channel>
</rss>

