<?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: query.fields in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77225#M7009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made the ability to upload any layer. Therefore I am do not know what attributes of the table will be loaded. For further action I need to know the names of these attributes. The first attribute, third and fifth - is for illustrative purposes only&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Jul 2014 05:55:47 GMT</pubDate>
    <dc:creator>AlexandrIvanov</dc:creator>
    <dc:date>2014-07-15T05:55:47Z</dc:date>
    <item>
      <title>query.fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77219#M7003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I'm doing an application based on a sample - &lt;A href="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=query_multiresults" title="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=query_multiresults"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;Only in my case initially loaded all the fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14049980366823253 jive_text_macro" jivemacro_uid="_14049980366823253" modifiedtitle="true"&gt;
&lt;P&gt;//build query filter&lt;/P&gt;
&lt;P&gt;query = new esri.tasks.Query();&lt;/P&gt;
&lt;P&gt;query.outSpatialReference = {"wkid": 102100};&lt;/P&gt;
&lt;P&gt;query.returnGeometry = true;&lt;/P&gt;
&lt;P&gt;query.outFields = ["*"];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//create the infoTemplate to be used in the infoWindow.&lt;/P&gt;
&lt;P&gt;infoTemplate = new esri.InfoTemplate("${FIELD_NAME}", "${*}");&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next I need to be able to choose the displayed fields, how can I get a list of all the fields layer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance and sorry for my english&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 13:18:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77219#M7003</guid>
      <dc:creator>AlexandrIvanov</dc:creator>
      <dc:date>2014-07-10T13:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: query.fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77220#M7004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use this to list all the fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14050017658771894 jive_text_macro" jivemacro_uid="_14050017658771894"&gt;
&lt;P&gt;infoTemplate = new esri.InfoTemplate("Attributes", "${*}");&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 14:17:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77220#M7004</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2014-07-10T14:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: query.fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77221#M7005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do so, but how do I get such a third element of this list?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 06:46:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77221#M7005</guid>
      <dc:creator>AlexandrIvanov</dc:creator>
      <dc:date>2014-07-11T06:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: query.fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77222#M7006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure what you mean by a third element. Can you explain that in more detail?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 13:08:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77222#M7006</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2014-07-11T13:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: query.fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77223#M7007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I load into the application map&lt;BR /&gt;load all the attributes:&lt;BR /&gt;infoTemplate = new esri.InfoTemplate("Attributes", "${*}");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now I want to get the first, third and fifth attribute from the list what they do not know.&lt;BR /&gt;For example: with the line "infoTemplate = new esri.InfoTemplate("Attributes", "${*}");&amp;nbsp; I get a list of attributes:&lt;BR /&gt;number&lt;BR /&gt;name&lt;BR /&gt;surname&lt;BR /&gt;rent&lt;BR /&gt;date1&lt;BR /&gt;date2&lt;BR /&gt;data3&lt;BR /&gt;when after press a button I should get a window with the inscription&lt;BR /&gt;number, surname, date1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;something like - &lt;BR /&gt;I load into the application map&lt;BR /&gt;load all the attributes:&lt;BR /&gt;infoTemplate = new esri.InfoTemplate("Attributes", "${*}");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now I want to get the first, third and fifth attribute from the list what they do not know.&lt;BR /&gt;For example: with the line "infoTemplate = new esri.InfoTemplate("Attributes", "${*}");&amp;nbsp; I get a list of attributes:&lt;BR /&gt;number&lt;BR /&gt;name&lt;BR /&gt;surname&lt;BR /&gt;rent&lt;BR /&gt;date1&lt;BR /&gt;date2&lt;BR /&gt;data3&lt;BR /&gt;when after press a button I should get a window with the inscription&lt;BR /&gt;number, surname, date1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;something like:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14053174313033543 jive_text_macro" jivemacro_uid="_14053174313033543" modifiedtitle="true"&gt;
&lt;P&gt;alert(infoTemplate.content[1] + "; "+ infoTemplate.content[3]+", "+infoTemplate.content[5])&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2014 06:06:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77223#M7007</guid>
      <dc:creator>AlexandrIvanov</dc:creator>
      <dc:date>2014-07-14T06:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: query.fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77224#M7008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="kwd"&gt;Are you saying that you will not know the names of the fields until after the first query is run?&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;Then you want to select the fields from the first query to show in the infowindow?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want an infotemplate with just your 3 fields - number, surname, date1&amp;nbsp; - use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="kwd"&gt;var&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; infoTemplate &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;new&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ"&gt;InfoTemplate&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"Attributes"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"&amp;lt;tr&amp;gt;number:&amp;lt;td&amp;gt;${number}&amp;lt;/tr&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;br&amp;gt;&amp;lt;tr&amp;gt;surname:&amp;lt;td&amp;gt;${surname}&amp;lt;/tr&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;br&amp;gt;&amp;lt;tr&amp;gt;date1:&amp;lt;td&amp;gt;${date1}&amp;lt;/tr&amp;gt;&amp;lt;/td&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun"&gt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str"&gt;&lt;SPAN class="pun"&gt;Luci&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2014 18:48:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77224#M7008</guid>
      <dc:creator>LuciHawkins</dc:creator>
      <dc:date>2014-07-14T18:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: query.fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77225#M7009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made the ability to upload any layer. Therefore I am do not know what attributes of the table will be loaded. For further action I need to know the names of these attributes. The first attribute, third and fifth - is for illustrative purposes only&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 05:55:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-fields/m-p/77225#M7009</guid>
      <dc:creator>AlexandrIvanov</dc:creator>
      <dc:date>2014-07-15T05:55:47Z</dc:date>
    </item>
  </channel>
</rss>

