<?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 retrieve all the fields from a layer after clicking identify in Javascript in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-retrieve-all-the-fields-from-a-layer-after/m-p/442883#M40912</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am using identify onclick. I am able to get the attributes only with their specific names like&lt;BR /&gt;idResult.feature.attributes['FACIL_ID']&lt;BR /&gt;&lt;BR /&gt;I want to retrieve all the fields and values from the attribute table of the layer. &lt;BR /&gt;Thanks&lt;BR /&gt;Qazi Iqbal&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for a demo. use the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var fields =[];
var fieldName;
for (attribute in idResult.feature.attributes)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; fields.push(attribute);
} 
for(var i=0; i&amp;lt;fields.length; i++)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldName =fields&lt;I&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // field name
&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(fieldName);
&amp;nbsp;&amp;nbsp;&amp;nbsp; // field value
&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(idResult.feature.attributes[fieldName]);
}
&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 19:48:19 GMT</pubDate>
    <dc:creator>HemingZhu</dc:creator>
    <dc:date>2021-12-11T19:48:19Z</dc:date>
    <item>
      <title>How to retrieve all the fields from a layer after clicking identify in Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-retrieve-all-the-fields-from-a-layer-after/m-p/442882#M40911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using identify onclick. I am able to get the attributes only with their specific names like&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;idResult.feature.attributes['FACIL_ID']&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to retrieve all the fields and values from the attribute table of the layer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Qazi Iqbal&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Dec 2011 15:51:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-retrieve-all-the-fields-from-a-layer-after/m-p/442882#M40911</guid>
      <dc:creator>QaziIqbal</dc:creator>
      <dc:date>2011-12-29T15:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve all the fields from a layer after clicking identify in Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-retrieve-all-the-fields-from-a-layer-after/m-p/442883#M40912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am using identify onclick. I am able to get the attributes only with their specific names like&lt;BR /&gt;idResult.feature.attributes['FACIL_ID']&lt;BR /&gt;&lt;BR /&gt;I want to retrieve all the fields and values from the attribute table of the layer. &lt;BR /&gt;Thanks&lt;BR /&gt;Qazi Iqbal&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for a demo. use the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var fields =[];
var fieldName;
for (attribute in idResult.feature.attributes)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; fields.push(attribute);
} 
for(var i=0; i&amp;lt;fields.length; i++)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldName =fields&lt;I&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // field name
&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(fieldName);
&amp;nbsp;&amp;nbsp;&amp;nbsp; // field value
&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(idResult.feature.attributes[fieldName]);
}
&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:48:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-retrieve-all-the-fields-from-a-layer-after/m-p/442883#M40912</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2021-12-11T19:48:19Z</dc:date>
    </item>
  </channel>
</rss>

