<?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 getContent() not working at 2.2 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getcontent-not-working-at-2-2/m-p/616084#M57567</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a few JS API apps which on Identify use the getContent() method to get hold of all the attribute information which I then format for various purposes for example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;function addToMap(idResults, evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //run through each feature found
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0, il = idResults.length; i &amp;lt; il; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var idResult = idResults&lt;I&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var content = idResult.feature.getContent()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ............etc&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This works great at 2.1, but if I change to 2.2 it breaks and the value of my variable 'content' is null as opposed to some nice HTML of fields and values I get at 2.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone please tell me how to get the content at 2.2?&amp;nbsp; I've tried exploring the reference, but can't work it out.&amp;nbsp; Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Apr 2011 13:42:11 GMT</pubDate>
    <dc:creator>MarkSmith</dc:creator>
    <dc:date>2011-04-19T13:42:11Z</dc:date>
    <item>
      <title>getContent() not working at 2.2</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getcontent-not-working-at-2-2/m-p/616084#M57567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a few JS API apps which on Identify use the getContent() method to get hold of all the attribute information which I then format for various purposes for example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;function addToMap(idResults, evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //run through each feature found
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0, il = idResults.length; i &amp;lt; il; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var idResult = idResults&lt;I&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var content = idResult.feature.getContent()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ............etc&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This works great at 2.1, but if I change to 2.2 it breaks and the value of my variable 'content' is null as opposed to some nice HTML of fields and values I get at 2.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone please tell me how to get the content at 2.2?&amp;nbsp; I've tried exploring the reference, but can't work it out.&amp;nbsp; Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2011 13:42:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getcontent-not-working-at-2-2/m-p/616084#M57567</guid>
      <dc:creator>MarkSmith</dc:creator>
      <dc:date>2011-04-19T13:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: getContent() not working at 2.2</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getcontent-not-working-at-2-2/m-p/616085#M57568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This forum &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/26234-Identify-Results-2.2-getContent?highlight=getContent"&gt;post&lt;/A&gt;&lt;SPAN&gt; contains details on how to fix this at 2.2.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2011 22:15:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getcontent-not-working-at-2-2/m-p/616085#M57568</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2011-04-19T22:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: getContent() not working at 2.2</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getcontent-not-working-at-2-2/m-p/616086#M57569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I now use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var content = esri.substitute(idResult.feature.attributes, "${*}")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rather than this which doesn't work at 2.2:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var content = idResult.feature.getContent()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 09:34:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getcontent-not-working-at-2-2/m-p/616086#M57569</guid>
      <dc:creator>MarkSmith</dc:creator>
      <dc:date>2011-05-12T09:34:32Z</dc:date>
    </item>
  </channel>
</rss>

