<?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 Query task not showing results in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690220#M64211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I am doing query task using dojo and arcgis javscript,&lt;/P&gt;&lt;P&gt;but the result is not showing, there is no error, please help me, I am new to javascript&lt;IMG alt="QueryTask.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/133537_QueryTask.jpg" style="width: 620px; height: 524px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Oct 2015 11:00:13 GMT</pubDate>
    <dc:creator>SadanandacharB1</dc:creator>
    <dc:date>2015-10-27T11:00:13Z</dc:date>
    <item>
      <title>Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690220#M64211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I am doing query task using dojo and arcgis javscript,&lt;/P&gt;&lt;P&gt;but the result is not showing, there is no error, please help me, I am new to javascript&lt;IMG alt="QueryTask.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/133537_QueryTask.jpg" style="width: 620px; height: 524px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 11:00:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690220#M64211</guid>
      <dc:creator>SadanandacharB1</dc:creator>
      <dc:date>2015-10-27T11:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690221#M64212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sadanandachar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you run the query in chrome, open your developer console, go to the Network tab, run the query in your map and then right-click the query in the network tab and choose "open link in new tab".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now where it says "query?f=json" in your link, replace json with html&lt;/P&gt;&lt;P&gt;Now you can see if your query is working properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&lt;SPAN class="font-color-meta" style="padding: 0 0 5px; font-size: 1.2em; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #8b8b8b; background-color: #e6e6e6;"&gt;&lt;SPAN class="replyToName" style="font-weight: inherit; font-style: inherit; font-size: 16.8px; font-family: inherit;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 12:44:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690221#M64212</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2015-10-27T12:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690222#M64213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sadanandachar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code seems to be ok. Are you getting any error? or the queryResults has Features?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the developer Tools and network activitiy and see if there were any issues.&lt;/P&gt;&lt;P&gt;Try the same query on the rest api, and make sure the where clause is formed correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thejus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 12:45:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690222#M64213</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2015-10-27T12:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690223#M64214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually my main map is in another page, that is i am adding map in map.manager.js&lt;/P&gt;&lt;P&gt;and i am doing query task in another js module using dojo.&lt;/P&gt;&lt;P&gt;I debugged the code, here i am getting&amp;nbsp; error like "unable to get 'map' and&amp;nbsp; 'graphics' property which is undefined or null".&lt;/P&gt;&lt;P&gt;How to solve this issue, Please help me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 12:58:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690223#M64214</guid>
      <dc:creator>SadanandacharB1</dc:creator>
      <dc:date>2015-10-27T12:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690224#M64215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need either keep the map variable as apart of Global, or when you initialize your module which contains the query, pass the map object as constructor parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 13:04:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690224#M64215</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2015-10-27T13:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690225#M64216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please show me one sample example &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 13:14:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690225#M64216</guid>
      <dc:creator>SadanandacharB1</dc:creator>
      <dc:date>2015-10-27T13:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690226#M64217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you create a module write something like this. I am just providing you a skeleton/overview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;define([...], {
&amp;nbsp;&amp;nbsp;&amp;nbsp; return declare([....], {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _map: null,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; constructor: function(map){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._map = map;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //other function/methods
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )};
});&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when you create the instance you create it like below, where map variable is esri map object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var myMod = new MyModule(map);&amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:03:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690226#M64217</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2021-12-12T05:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690227#M64218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why all the changing the extents so many times?&amp;nbsp; Before you go to the trouble of stepping through each resultFeature, I'd comment both the if loop and the for loop and make sure you're getting results returned at all.&amp;nbsp; It could be you have results, but you have an issue with setting your extents.&amp;nbsp; It's always possible you aren't on the right place in your map.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd also recommend checking your where clause at the rest endpoint and make sure you're getting data from there.&amp;nbsp; Are you familiar with how to do this?&amp;nbsp;&amp;nbsp; If you navigate to the URL you have in the queryTask, scroll down to the bottom where it shows Supported Operations and choose Query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the top of that form, there is a place you can paste your where clause.&amp;nbsp; Use actual values, not your variables, because this is a self contained kind of test.&amp;nbsp;&amp;nbsp; Be sure and set the outFields to *.&amp;nbsp; Then run this, choosing either select GET or POST, I have found that it matters for this kind of test.&amp;nbsp; If it doesn't return results successfully here, it won't work in your code either.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 14:05:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690227#M64218</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-10-27T14:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690228#M64219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thejus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i added a map instance like below but i am getting same error&lt;IMG alt="QueryTaskError.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/133748_QueryTaskError.jpg" style="width: 620px; height: 499px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 09:41:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690228#M64219</guid>
      <dc:creator>SadanandacharB1</dc:creator>
      <dc:date>2015-10-28T09:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690229#M64220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Hi thejus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Actually i added a map instance like below but i am getting same error&lt;IMG alt="QueryTaskError.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/133695_QueryTaskError.jpg" style="width: 620px; height: 499px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 10:59:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690229#M64220</guid>
      <dc:creator>SadanandacharB1</dc:creator>
      <dc:date>2015-10-28T10:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690230#M64221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sadananachar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that is because of the scope of function. first you need to use this._map and not just _map. Second you need to ensure that the scope of the fuction is at module level. this can be achieved by using lang.hitch. For query task it should be something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14460368444564748" data-renderedposition="113_8_912_16" jivemacro_uid="_14460368444564748" modifiedtitle="true"&gt;&lt;P&gt;queryTask.execute(query, lang.hitch(this, this.showResults));&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also in your case you need to ensure that the function where you are setting up the query (_onSubmitClick)is also in the same scope. But In your case it seems to be ok as you are already using this.showResults. If it is not working then you need to hitch it to the right scope as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thejus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 12:54:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690230#M64221</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2015-10-28T12:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Query task not showing results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690231#M64222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thejus many many many many.... thanks to you, it solved my problem&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 05:35:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-task-not-showing-results/m-p/690231#M64222</guid>
      <dc:creator>SadanandacharB1</dc:creator>
      <dc:date>2015-10-29T05:35:01Z</dc:date>
    </item>
  </channel>
</rss>

