<?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: How to get the column names of a feature layer with JSAPI in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177278#M4945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you waiting for the FeatureLayer to load before you are checking the fields?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;centerlineFeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"load"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;info&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;centerlineFeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;fields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 09:06:59 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-11T09:06:59Z</dc:date>
    <item>
      <title>How to get the column names of a feature layer with JSAPI</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177275#M4942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a feature layer connected to a WAB map, with the following fields&lt;/P&gt;&lt;UL style="color: #000000; background-color: #ffffff; font-size: 14.4px;"&gt;&lt;LI style="padding: 0px 0px 3px;"&gt;OBJECTID &lt;EM&gt;( type: esriFieldTypeOID , alias: OBJECTID )&lt;/EM&gt;&lt;/LI&gt;&lt;LI style="padding: 0px 0px 3px;"&gt;LINE &lt;EM&gt;( type: esriFieldTypeInteger , alias: LINE )&lt;/EM&gt;&lt;/LI&gt;&lt;LI style="padding: 0px 0px 3px;"&gt;ROUTE &lt;EM&gt;( type: esriFieldTypeInteger , alias: ROUTE )&lt;/EM&gt;&lt;/LI&gt;&lt;LI style="padding: 0px 0px 3px;"&gt;SHAPE &lt;EM&gt;( type: esriFieldTypeGeometry , alias: SHAPE )&lt;/EM&gt;&lt;/LI&gt;&lt;LI style="padding: 0px 0px 3px;"&gt;SHAPE.STLength() &lt;EM&gt;( type: esriFieldTypeDouble , alias: SHAPE.STLength() )&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Utilizing the &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/featurelayer.html"&gt;Feature Layer Object&lt;/A&gt;, is there any simple way to get a list of the field names? I'd rather not run a&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/featurelayer.html#queryfeatures"&gt;Query&lt;/A&gt;, but if I have to what is best way to only return 1 record with those field names?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 18:10:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177275#M4942</guid>
      <dc:creator>JoeMinicucci</dc:creator>
      <dc:date>2016-11-11T18:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the column names of a feature layer with JSAPI</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177276#M4943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;A FeatureLayer has a fields property:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/featurelayer.html#fields" title="https://developers.arcgis.com/javascript/3/jsapi/featurelayer.html#fields"&gt;FeatureLayer (legacy) | API Reference | ArcGIS API for JavaScript 3.18 | fields&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 18:13:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177276#M4943</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-11-11T18:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the column names of a feature layer with JSAPI</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177277#M4944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried accessing that object, Fields is null.. here is the logic (I confirmed the&amp;nbsp;&lt;SPAN&gt;selectedCenterlineUrl is corrrect):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var selectedCenterlineUrl = this.HierarchyTableCenterlineSelect[this.HierarchyTableCenterlineSelect.selectedIndex].value;&lt;BR /&gt; var centerlineFeatureLayer = new FeatureLayer(selectedCenterlineUrl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;centerlineFeatureLayer gets created but fields is null..Why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 18:29:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177277#M4944</guid>
      <dc:creator>JoeMinicucci</dc:creator>
      <dc:date>2016-11-11T18:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the column names of a feature layer with JSAPI</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177278#M4945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you waiting for the FeatureLayer to load before you are checking the fields?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;centerlineFeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"load"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;info&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;centerlineFeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;fields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:06:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177278#M4945</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T09:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the column names of a feature layer with JSAPI</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177279#M4946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert, thank you so much. This saved me hours of frustration and produced the intended result!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 18:35:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177279#M4946</guid>
      <dc:creator>JoeMinicucci</dc:creator>
      <dc:date>2016-11-11T18:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the column names of a feature layer with JSAPI</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177280#M4947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 18:46:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-get-the-column-names-of-a-feature-layer/m-p/177280#M4947</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-11-11T18:46:21Z</dc:date>
    </item>
  </channel>
</rss>

