<?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: ArcGIS Server MapService Query in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-server-mapservice-query/m-p/423663#M38970</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your request is longer than 2048 characters, you'll need to use a &lt;A href="https://developers.arcgis.com/javascript/jshelp/ags_proxy.html"&gt;proxy&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Dec 2014 18:58:21 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2014-12-18T18:58:21Z</dc:date>
    <item>
      <title>ArcGIS Server MapService Query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-server-mapservice-query/m-p/423662#M38969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might classify this thread as a bug report.&amp;nbsp; The scenario is described below:&lt;/P&gt;&lt;P&gt;I created a JS application that does query on a MapService layer.&amp;nbsp; In the debugging, I got the value of the query.where&amp;nbsp; clause.&amp;nbsp; If I post this clause into the MapService layer's Where textbox, and then click the Query button, I can get respected results (e.g. a couple of dozens of records, which are the same as that in ArcMap's definition-query on the map layer in the map document).&amp;nbsp; This query clause is VERY long.&amp;nbsp; In my JS application,&amp;nbsp; I put a break-point in function showResults().&amp;nbsp; If the query clause is NOT too long, the code goes through smoothly.&amp;nbsp; However, if the clause is Too Long, it goes through without any break.&amp;nbsp; I would guess there is may be a bug in the API that may limits the length of whereClause.&amp;nbsp; If you have similar experience like that, please share&amp;nbsp; Thanks for your attention.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;queryTask.execute(query, showResults);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function showResults(result) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var items = [];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0, il = result.features.length; i &amp;lt; il; i++) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; items.push(result.features&lt;I&gt;.attributes);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2014 18:47:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-server-mapservice-query/m-p/423662#M38969</guid>
      <dc:creator>ShaningYu</dc:creator>
      <dc:date>2014-12-18T18:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server MapService Query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-server-mapservice-query/m-p/423663#M38970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your request is longer than 2048 characters, you'll need to use a &lt;A href="https://developers.arcgis.com/javascript/jshelp/ags_proxy.html"&gt;proxy&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2014 18:58:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-server-mapservice-query/m-p/423663#M38970</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2014-12-18T18:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Server MapService Query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-server-mapservice-query/m-p/423664#M38971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ken:&amp;nbsp; Thanks for your point.&amp;nbsp; I added a couple lines of code, but it still does not work.&amp;nbsp; The code I added are listed below:&lt;/P&gt;&lt;P&gt;&amp;nbsp; dojo.require("esri.urlUtils");&amp;nbsp;&amp;nbsp; // for proxy&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;In function init(), added:&lt;/P&gt;&lt;P&gt;&amp;nbsp; esriConfig.defaults.io.proxyUrl = _proxyURL;&lt;/P&gt;&lt;P&gt;&amp;nbsp; esriConfig.defaults.io.alwaysUseProxy = false;&lt;/P&gt;&lt;P&gt;Did I miss anything else?&amp;nbsp; Thanks if you can further point it out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2014 20:20:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-server-mapservice-query/m-p/423664#M38971</guid>
      <dc:creator>ShaningYu</dc:creator>
      <dc:date>2014-12-18T20:20:20Z</dc:date>
    </item>
  </channel>
</rss>

