<?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: Object has no method 'query' in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/object-has-no-method-query/m-p/329121#M30453</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Clicking it fires the "setSymbology()" function, please post that code.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"onChange" not "onClick" fires the setSymbology() function, as it has it that function has nothing in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The onChange event will not fire if the ComboBOx is not populated with the values from the datastore so that you can affect a change.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jul 2012 22:28:09 GMT</pubDate>
    <dc:creator>KeithSandell</dc:creator>
    <dc:date>2012-07-09T22:28:09Z</dc:date>
    <item>
      <title>Object has no method 'query'</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/object-has-no-method-query/m-p/329119#M30451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm extending the "Add Shapefile" example to allow the user to select a column from the shapefile by which to set the symbology of the layer added...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Taking a featureCollection, extracting field names to populate a dijit.form.ComboBox:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This part works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
function populateColumnDropDown(featureCollection){
 names = featureCollection.layers[0].layerDefinition.fields;
 var fieldNames = [];
 for(i = 0; i &amp;lt; names.length; i++){
&amp;nbsp; if(names&lt;I&gt;.name != "FID"){
&amp;nbsp;&amp;nbsp; fieldNames.push({name:names&lt;I&gt;.name});
&amp;nbsp; }
 }
 var dataItems = {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifier: 'name',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label: 'name',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; items: fieldNames
 };
 var store = new dojo.data.ItemFileReadStore({data:dataItems});
 dijit.byId("columnInput").store = store;
}

&amp;lt;select id="columnInput" dojotype="dijit.form.ComboBox" style="width:150px;" value="Select Column" title="Select Column To Symbolize" fetchProperties="{sort:[{attribute:'name', descending:false}]}" onChange="setSymbology();" disabled&amp;gt;&amp;lt;/select&amp;gt;
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No errors are thrown until I click the comboBox to see the values. Then it throws a: Object has no method 'query' error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 17:42:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/object-has-no-method-query/m-p/329119#M30451</guid>
      <dc:creator>KeithSandell</dc:creator>
      <dc:date>2012-07-09T17:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Object has no method 'query'</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/object-has-no-method-query/m-p/329120#M30452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm extending the "Add Shapefile" example to allow the user to select a column from the shapefile by which to set the symbology of the layer added...&lt;BR /&gt;&lt;BR /&gt;Taking a featureCollection, extracting field names to populate a dijit.form.ComboBox:&lt;BR /&gt;&lt;BR /&gt;This part works:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function populateColumnDropDown(featureCollection){
 names = featureCollection.layers[0].layerDefinition.fields;
 var fieldNames = [];
 for(i = 0; i &amp;lt; names.length; i++){
&amp;nbsp; if(names&lt;I&gt;.name != "FID"){
&amp;nbsp;&amp;nbsp; fieldNames.push({name:names&lt;I&gt;.name});
&amp;nbsp; }
 }
 var dataItems = {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; identifier: 'name',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label: 'name',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; items: fieldNames
 };
 var store = new dojo.data.ItemFileReadStore({data:dataItems});
 dijit.byId("columnInput").store = store;
}

&amp;lt;select id="columnInput" dojotype="dijit.form.ComboBox" style="width:150px;" value="Select Column" title="Select Column To Symbolize" fetchProperties="{sort:[{attribute:'name', descending:false}]}" onChange="setSymbology();" disabled&amp;gt;&amp;lt;/select&amp;gt;
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;No errors are thrown until I click the comboBox to see the values. Then it throws a: Object has no method 'query' error.&lt;BR /&gt;&lt;BR /&gt;Any thoughts?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Clicking it fires the "setSymbology()" function, please post that code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:35:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/object-has-no-method-query/m-p/329120#M30452</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2021-12-11T15:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Object has no method 'query'</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/object-has-no-method-query/m-p/329121#M30453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Clicking it fires the "setSymbology()" function, please post that code.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"onChange" not "onClick" fires the setSymbology() function, as it has it that function has nothing in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The onChange event will not fire if the ComboBOx is not populated with the values from the datastore so that you can affect a change.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 22:28:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/object-has-no-method-query/m-p/329121#M30453</guid>
      <dc:creator>KeithSandell</dc:creator>
      <dc:date>2012-07-09T22:28:09Z</dc:date>
    </item>
  </channel>
</rss>

