<?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: Cant get the execute query task to run in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cant-get-the-execute-query-task-to-run/m-p/647781#M60369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dave,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The function you are trying to call takes one parameter&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;input type="button" value="Get Details" onclick="executeQueryTask(dojo.byId('QUALIFICAT').value);" /&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the function you have in the code snippet does not take any parameter&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function executeQueryTask() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //set query based on what user typed in for population;
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = "QUALIFICAT IN " + QUALIFICAT;

&amp;nbsp;&amp;nbsp;&amp;nbsp; //execute query
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query,showResults);
&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead try to change to below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function executeQueryTask(QUALIFICAT) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //set query based on what user typed in for population;
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = "QUALIFICAT IN " + QUALIFICAT;

&amp;nbsp;&amp;nbsp;&amp;nbsp; //execute query
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query,showResults);
&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Manish&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:28:31 GMT</pubDate>
    <dc:creator>ManishkumarPatel</dc:creator>
    <dc:date>2021-12-12T03:28:31Z</dc:date>
    <item>
      <title>Cant get the execute query task to run</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cant-get-the-execute-query-task-to-run/m-p/647778#M60366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I want to have a map load as soon as the page is open...it will plot all 1000+ points on the map...then at the top of the page there is a text box where the user can filter the map. Once the button is clicked it should kick off a query task and query the layer only showing those that were typed in the text box. I keep getting the error executeQueryTask is not defined...I know I am missing something simple but cant figure it out. My code is below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;function init() {
&amp;nbsp; 
&amp;nbsp; queryTask = new esri.tasks.QueryTask("https://myserver/Locations/MapServer/0");

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //initialize query
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query = new Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.returnGeometry = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.outFields = ["*"];
&amp;nbsp; }
&amp;nbsp; function executeQueryTask() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //set query based on what user typed in for population;
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = "QUALIFICAT IN " + QUALIFICAT;

&amp;nbsp;&amp;nbsp;&amp;nbsp; //execute query
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query,showResults);
&amp;nbsp; }
&amp;nbsp;&amp;nbsp; function showResults(featureSet) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //remove all graphics on the maps graphics layer
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.clear();

&amp;nbsp;&amp;nbsp;&amp;nbsp; //Performance enhancer - assign featureSet array to a single variable.
&amp;nbsp;&amp;nbsp;&amp;nbsp; var resultFeatures = featureSet.features;

&amp;nbsp;&amp;nbsp;&amp;nbsp; //Loop through each feature returned
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i=0, il=resultFeatures.length; i&amp;lt;il; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Get the current feature from the featureSet.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Feature is a graphic
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic = resultFeatures&lt;I&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(symbol);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Set the infoTemplate.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setInfoTemplate(infoTemplate);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Add graphic to the map graphics layer.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; } 
&amp;lt;body&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Qualification Type: &amp;lt;input type="text" id="QUALIFICAT" value="OT" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type="button" value="Get Details" onclick="executeQueryTask(dojo.byId('QUALIFICAT').value);" /&amp;gt;
&amp;nbsp; &amp;lt;div id="map"&amp;gt;&amp;lt;/div&amp;gt;
&amp;nbsp; &amp;lt;div id="footer"
&amp;nbsp; data-dojo-TYPE="dijit.layout.ContentPane"
&amp;nbsp; data-dojo-props="region:'bottom'"&amp;gt;
 
&amp;nbsp; &amp;lt;/div&amp;gt;
&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 19:04:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cant-get-the-execute-query-task-to-run/m-p/647778#M60366</guid>
      <dc:creator>DaveTaylor</dc:creator>
      <dc:date>2014-05-28T19:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get the execute query task to run</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cant-get-the-execute-query-task-to-run/m-p/647779#M60367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;you are calling executeQueryTask(variable)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but you have no function executeQueryTask(variable), you only have executeQueryTask() which takes no arguments&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 19:38:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cant-get-the-execute-query-task-to-run/m-p/647779#M60367</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2014-05-28T19:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get the execute query task to run</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cant-get-the-execute-query-task-to-run/m-p/647780#M60368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry I am not following.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I must be overlooking something...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 20:05:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cant-get-the-execute-query-task-to-run/m-p/647780#M60368</guid>
      <dc:creator>DaveTaylor</dc:creator>
      <dc:date>2014-05-28T20:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get the execute query task to run</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cant-get-the-execute-query-task-to-run/m-p/647781#M60369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dave,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The function you are trying to call takes one parameter&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;input type="button" value="Get Details" onclick="executeQueryTask(dojo.byId('QUALIFICAT').value);" /&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the function you have in the code snippet does not take any parameter&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function executeQueryTask() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //set query based on what user typed in for population;
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = "QUALIFICAT IN " + QUALIFICAT;

&amp;nbsp;&amp;nbsp;&amp;nbsp; //execute query
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query,showResults);
&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead try to change to below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function executeQueryTask(QUALIFICAT) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //set query based on what user typed in for population;
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = "QUALIFICAT IN " + QUALIFICAT;

&amp;nbsp;&amp;nbsp;&amp;nbsp; //execute query
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query,showResults);
&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Manish&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:28:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cant-get-the-execute-query-task-to-run/m-p/647781#M60369</guid>
      <dc:creator>ManishkumarPatel</dc:creator>
      <dc:date>2021-12-12T03:28:31Z</dc:date>
    </item>
  </channel>
</rss>

