<?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.Outfields - reading aliases from the Map document in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-outfields-reading-aliases-from-the-map/m-p/454012#M41963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;STRONG&gt;Query&lt;/STRONG&gt;&lt;SPAN&gt; help page at &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/query.htm"&gt;http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/query.htm&lt;/A&gt;&lt;SPAN&gt; says:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Outfields - You must list the actual field names rather than the alias names... However, you are able&amp;nbsp; to use the alias names when you display the results. You can set field&amp;nbsp; alias names in the map document"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All of the samples use hard-coded alias names, eg:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;infoTemplate.setContent("&amp;lt;b&amp;gt;2000 Population: &amp;lt;/b&amp;gt;${POP2000}&amp;lt;br/&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know the syntax to retrieve the field alias programatically from the ArcGIS Server services endpoint?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ie, rather than hard-coding &lt;/SPAN&gt;&lt;STRONG&gt;2000 Population&lt;/STRONG&gt;&lt;SPAN&gt;, how could you retrieve it from the&lt;/SPAN&gt;&lt;STRONG&gt; ${POP2000}&lt;/STRONG&gt;&lt;SPAN&gt; parameter? I'm trying to write a generic query function which can be used by multiple layers, with different schemas.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Sep 2010 06:20:26 GMT</pubDate>
    <dc:creator>StephenLead</dc:creator>
    <dc:date>2010-09-07T06:20:26Z</dc:date>
    <item>
      <title>Query.Outfields - reading aliases from the Map document</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-outfields-reading-aliases-from-the-map/m-p/454012#M41963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;STRONG&gt;Query&lt;/STRONG&gt;&lt;SPAN&gt; help page at &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/query.htm"&gt;http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/query.htm&lt;/A&gt;&lt;SPAN&gt; says:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Outfields - You must list the actual field names rather than the alias names... However, you are able&amp;nbsp; to use the alias names when you display the results. You can set field&amp;nbsp; alias names in the map document"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All of the samples use hard-coded alias names, eg:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;infoTemplate.setContent("&amp;lt;b&amp;gt;2000 Population: &amp;lt;/b&amp;gt;${POP2000}&amp;lt;br/&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know the syntax to retrieve the field alias programatically from the ArcGIS Server services endpoint?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ie, rather than hard-coding &lt;/SPAN&gt;&lt;STRONG&gt;2000 Population&lt;/STRONG&gt;&lt;SPAN&gt;, how could you retrieve it from the&lt;/SPAN&gt;&lt;STRONG&gt; ${POP2000}&lt;/STRONG&gt;&lt;SPAN&gt; parameter? I'm trying to write a generic query function which can be used by multiple layers, with different schemas.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 06:20:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-outfields-reading-aliases-from-the-map/m-p/454012#M41963</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2010-09-07T06:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Query.Outfields - reading aliases from the Map document</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-outfields-reading-aliases-from-the-map/m-p/454013#M41964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check out this thread:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/7793-Identify-How-to-show-Alias-filed-instead-of-Field-Name?p=26145"&gt;http://forums.arcgis.com/threads/7793-Identify-How-to-show-Alias-filed-instead-of-Field-Name?p=26145&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 16:41:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-outfields-reading-aliases-from-the-map/m-p/454013#M41964</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2010-09-07T16:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Query.Outfields - reading aliases from the Map document</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-outfields-reading-aliases-from-the-map/m-p/454014#M41965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the info Derek.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I actually found an easier way - the QueryTask.Execute method returns a FeatureSet, which returns the fieldAliases.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/featureset.htm#fieldAliases"&gt;http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/featureset.htm#fieldAliases&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 01:04:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-outfields-reading-aliases-from-the-map/m-p/454014#M41965</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2010-09-09T01:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Query.Outfields - reading aliases from the Map document</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-outfields-reading-aliases-from-the-map/m-p/454015#M41966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nice, not sure how I missed that previously...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 16:49:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-outfields-reading-aliases-from-the-map/m-p/454015#M41966</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2010-09-09T16:49:52Z</dc:date>
    </item>
  </channel>
</rss>

