<?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: Field Alias with FeatureLayer.getSelectedFeatures(); in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/field-alias-with-featurelayer-getselectedfeatures/m-p/534472#M49809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The field infos, including alias can be found in the FEATURE_LAYER.fields object.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jul 2013 15:50:27 GMT</pubDate>
    <dc:creator>BenFousek</dc:creator>
    <dc:date>2013-07-19T15:50:27Z</dc:date>
    <item>
      <title>Field Alias with FeatureLayer.getSelectedFeatures();</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/field-alias-with-featurelayer-getselectedfeatures/m-p/534471#M49808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using the selectFeatures method on a Feature Layer to select features.&amp;nbsp;&amp;nbsp; Upon completing the selection,&amp;nbsp; I am calling the .getSelectedFeatures method which returns the features and their attributes selectecd from a FeatureLayer.&amp;nbsp;&amp;nbsp;&amp;nbsp; I would like to get the Alias and value, rather than the field name and value to display in a form.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I get the Field Alias and Field Value after executing the getSelectedFeatures method? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mele&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 15:27:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/field-alias-with-featurelayer-getselectedfeatures/m-p/534471#M49808</guid>
      <dc:creator>MeleKoneya</dc:creator>
      <dc:date>2013-07-19T15:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Field Alias with FeatureLayer.getSelectedFeatures();</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/field-alias-with-featurelayer-getselectedfeatures/m-p/534472#M49809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The field infos, including alias can be found in the FEATURE_LAYER.fields object.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 15:50:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/field-alias-with-featurelayer-getselectedfeatures/m-p/534472#M49809</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2013-07-19T15:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Field Alias with FeatureLayer.getSelectedFeatures();</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/field-alias-with-featurelayer-getselectedfeatures/m-p/534473#M49810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Ben,&amp;nbsp;&amp;nbsp; I did find the FEATURE_LAYER.fields object and its Aliases.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What I would like to do is use that to substitute the field name results of getSelectedFeatures, with the Alias programmatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please let me know if anyone has a code sample.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mele&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 15:56:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/field-alias-with-featurelayer-getselectedfeatures/m-p/534473#M49810</guid>
      <dc:creator>MeleKoneya</dc:creator>
      <dc:date>2013-07-19T15:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Field Alias with FeatureLayer.getSelectedFeatures();</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/field-alias-with-featurelayer-getselectedfeatures/m-p/534474#M49811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's a function from my base that takes the attributes of a feature and the feature layer itself as arguments, and returns a simple table. Also shows how to test a value against a URL regular expression.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;featureAttributeTable: function(atts, feature) { &amp;nbsp; var table = '&amp;lt;table cellspacing="0" cellpadding="2" style="width:100%;"&amp;gt;'; &amp;nbsp; for (var i in atts) { &amp;nbsp;&amp;nbsp;&amp;nbsp; var alias; &amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.forEach(feature.fields, function (field) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (field.name === i) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alias = field.alias; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; }); &amp;nbsp;&amp;nbsp;&amp;nbsp; var value = atts&lt;I&gt;; &amp;nbsp;&amp;nbsp;&amp;nbsp; var exp = new RegExp(/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&amp;amp;%@!\-\/]))?/); &amp;nbsp;&amp;nbsp;&amp;nbsp; if (exp.test(value)) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value = '&amp;lt;a href="' + atts&lt;I&gt; + '" title="' + atts&lt;I&gt; + '" target="_blank"&amp;gt;Hyperlink&amp;lt;/a&amp;gt;' &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; table += '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;' + alias + '&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + value + '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'; &amp;nbsp; } &amp;nbsp; table += '&amp;lt;/table&amp;gt;'; &amp;nbsp; return table }&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 16:26:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/field-alias-with-featurelayer-getselectedfeatures/m-p/534474#M49811</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2013-07-19T16:26:53Z</dc:date>
    </item>
  </channel>
</rss>

