<?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: Format infoTemplate content with custom function in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300373#M27572</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you using 3.7? graphic.attr() was introduced at 3.7 (we'll update the docs to say this).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attr is also used to add attributes to a graphic's DOM node, it doesn't affect graphic.attributes (which I admit is confusing). If you want to add to or update a graphic.attributes, modify that object directly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Oct 2013 20:59:55 GMT</pubDate>
    <dc:creator>derekswingley1</dc:creator>
    <dc:date>2013-10-02T20:59:55Z</dc:date>
    <item>
      <title>Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300365#M27564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to format the value of a field for display in an infoTemplate but nothing is happening; it appears as though the function is not being called. I used the example &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/javascript/jssamples/widget_formatInfoWindow.html" rel="nofollow" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt; as a guide, see the compare() function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I simply want to format the text to display either Gbps or Tbps based on the value of the field. The relevant field is called "Capacity_G" and I put the console.log statements in there to test whether the function was executing; it is not. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var infoTemplate = new InfoTemplat(); infoTemplate.setTitle("&amp;lt;b&amp;gt;Cable: ${NAME}&amp;lt;/b&amp;gt;"); infoTemplate.setContent("Capacity: ${CAPACITY_G:formatCapacity}");&amp;nbsp; function formatCapacity(value){ &amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("LALALALALAA"); &amp;nbsp;&amp;nbsp;&amp;nbsp; var cap = ""; &amp;nbsp;&amp;nbsp;&amp;nbsp; //1Tb = 1024Gb &amp;nbsp;&amp;nbsp;&amp;nbsp; if (value &amp;gt;= 1024){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cap = value/1024 + "Tbps"; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; else { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cap = value + "Mbps"; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("LALALALALALALA"); &amp;nbsp;&amp;nbsp;&amp;nbsp; return cap; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What have I done wrong? The text in the resulting popup appears unmodified, exactly as it is in the attributes of the data.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 16:27:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300365#M27564</guid>
      <dc:creator>RyanClancy</dc:creator>
      <dc:date>2013-09-24T16:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300366#M27565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In the sample you linked to, the formatting function is in the global scope. To get your formatting function to run, make it a global (or a property on some global object).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 16:50:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300366#M27565</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-09-24T16:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300367#M27566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In the sample you linked to, the formatting function is in the global scope. To get your formatting function to run, make it a global (or a property on some global object).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yep, that was it. Works perfectly now. Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 16:52:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300367#M27566</guid>
      <dc:creator>RyanClancy</dc:creator>
      <dc:date>2013-09-24T16:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300368#M27567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems I'm having another issue of scope on this same topic. I've updated my code to use dojo/ready and instead of the base infoWindow I'm now using a Popup. My formatting function is no longer being called. Is this a problem of scope or something to do with the Popup vs base infoWindow? Initially the formatCapacity() function was inside the ready(function(){*in here*}) as a global function but when it didn't work I moved it outside of the ready(). Either way it is not called. Everything else works. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
require([
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/map",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/dijit/Popup",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/dijit/PopupTemplate",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "dojo/ready",
&amp;nbsp;&amp;nbsp;&amp;nbsp; etc.....
&amp;nbsp;&amp;nbsp;&amp;nbsp; ....
] , function(
&amp;nbsp;&amp;nbsp;&amp;nbsp; Map,
&amp;nbsp;&amp;nbsp;&amp;nbsp; Popup,
&amp;nbsp;&amp;nbsp;&amp;nbsp; PopupTemplate,
&amp;nbsp;&amp;nbsp;&amp;nbsp; ready,
&amp;nbsp;&amp;nbsp;&amp;nbsp; etc...
&amp;nbsp;&amp;nbsp;&amp;nbsp; ....
) {
&amp;nbsp;&amp;nbsp; function formatCapacity(value){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("Formatting function is called");
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; ready(function(){
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var popupTemplate = new PopupTemplate();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; popupTemplate.setTitle("&amp;lt;b&amp;gt;${NAME}&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; popupTemplate.setContent("&amp;lt;b&amp;gt;Cable: ${CAPACITY_G:formatCapacity}&amp;lt;/b&amp;gt;");
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var popup = new Popup({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; highlight: false,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; titleInBody: true
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, dojo.create("div"));

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; etc....
&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;&amp;nbsp; });
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:24:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300368#M27567</guid>
      <dc:creator>RyanClancy</dc:creator>
      <dc:date>2021-12-11T14:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300369#M27568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you're still using setContent and setTitle, continue to use an instance of InfoTemplate. You can use it with Popup. Unless you want PopupTemplate's specific features, no need to use PopupTemplate.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 17:50:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300369#M27568</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-10-01T17:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300370#M27569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you're still using setContent and setTitle, continue to use an instance of InfoTemplate. You can use it with Popup. Unless you want PopupTemplate's specific features, no need to use PopupTemplate.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Okay, I switched back to InfoTemplate. Instead of displaying the default popup over the map I've disabled it with map.infoWindow.set("popupWindow", false) .&amp;nbsp; I'm writing the contents of the popup to a &amp;lt;div&amp;gt; that I define, somewhat like &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jssamples/popup_sidepanel.html" rel="nofollow noopener noreferrer" target="_blank"&gt;this&lt;/A&gt;&lt;SPAN&gt;. This is why I switched to Popup; I didn't realize I could use InfoTemplate with Popup. The only other difference is the addition of dojo/ready. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The map's infoWindow is set like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
map = new map("mapDiv", {
&amp;nbsp;&amp;nbsp;&amp;nbsp; infoWindow: popup
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The popup is defined as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var popup = new Popup({
&amp;nbsp;&amp;nbsp;&amp;nbsp; highlight:false,
&amp;nbsp;&amp;nbsp;&amp;nbsp; titleInBody: true
}, dojo.create("div"));
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;InfoTemplate is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var infoTemplate = new InfoTemplate();
infoTemplate.setTitle("&amp;lt;b&amp;gt;Cable:&amp;lt;/b&amp;gt; ${NAME}");
infoTemplate.setContent("&amp;lt;b&amp;gt;Cable:&amp;lt;/b&amp;gt; ${NAME}"&amp;lt;br&amp;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;&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;&amp;nbsp;&amp;nbsp; + "&amp;lt;b&amp;gt;Capacity:&amp;lt;/b&amp;gt; ${CAPACITY_G:formatCapacity}");
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...all of this happens within ready() and the formatCapacity() function is never called regardless of whether it is nested with ready() or outside of ready().&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:24:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300370#M27569</guid>
      <dc:creator>RyanClancy</dc:creator>
      <dc:date>2021-12-11T14:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300371#M27570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When you're not using the popup on the map, things are a little different. When putting content from a feature in an element outside the map, you have to do more with your code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the sample you linked to, the displayPopupContent function gets feature info and puts it in a div. This is where you could also do any custom formatting.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 12:04:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300371#M27570</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-10-02T12:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300372#M27571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ah, I see. In that case, how do I call the &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jsapi/graphic-amd.html#attr" rel="nofollow noopener noreferrer" target="_blank"&gt;graphic.attr() method&lt;/A&gt;&lt;SPAN&gt;? My code is giving me a "feature.attr is not a function" error. Here's what I'm trying to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
showPopupContent(popup.getSelectedFeature());

function showPopupContent(feature){
&amp;nbsp;&amp;nbsp;&amp;nbsp; var cap = "";

&amp;nbsp;&amp;nbsp;&amp;nbsp; if (feature.attributes.CAPACITY_G &amp;gt; 0){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (feature.attributes.CAPACITY_G &amp;gt;= 1000{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cap = dojo.number.format(feature.attributes.CAPACITY_G/1000, {places:2}) + " Tbps";
&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;&amp;nbsp; else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cap = feature.attribues.CAPACITY_G + " Gbps";
&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; else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cap = " n/a"
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Set the CAPACITY_G attribute to be the newly formatted value
&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.attr("CAPACITY_G", cap);
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Get the content for the current feature
&amp;nbsp;&amp;nbsp;&amp;nbsp; var content = feature.getContent();
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Display content in the side panel
&amp;nbsp;&amp;nbsp;&amp;nbsp; dom.byId("cableInfo").innerHTML = content;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:24:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300372#M27571</guid>
      <dc:creator>RyanClancy</dc:creator>
      <dc:date>2021-12-11T14:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300373#M27572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you using 3.7? graphic.attr() was introduced at 3.7 (we'll update the docs to say this).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attr is also used to add attributes to a graphic's DOM node, it doesn't affect graphic.attributes (which I admit is confusing). If you want to add to or update a graphic.attributes, modify that object directly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 20:59:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300373#M27572</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-10-02T20:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300374#M27573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are you using 3.7? graphic.attr() was introduced at 3.7 (we'll update the docs to say this).&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ah, that's the gotcha that got me. I was using 3.6 but I'll switch to 3.7 today. Thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Attr is also used to add attributes to a graphic's DOM node, it doesn't affect graphic.attributes (which I admit is confusing).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;....and oh yes, that is confusing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 12:29:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300374#M27573</guid>
      <dc:creator>RyanClancy</dc:creator>
      <dc:date>2013-10-03T12:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300375#M27574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are you using 3.7? graphic.attr() was introduced at 3.7 (we'll update the docs to say this).&lt;BR /&gt;&lt;BR /&gt;Attr is also used to add attributes to a graphic's DOM node, it doesn't affect graphic.attributes (which I admit is confusing). If you want to add to or update a graphic.attributes, modify that object directly.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you know of an example of how to add a &lt;/SPAN&gt;&lt;STRONG&gt;real&lt;/STRONG&gt;&lt;SPAN&gt; attribute to a graphic?&amp;nbsp; and I'll second the original poster here, graphic.attr is &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;very&lt;/SPAN&gt;&lt;SPAN&gt; confusing.&amp;nbsp; What exactly is the point of adding an attribute to a graphic's &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;DOM&lt;/SPAN&gt;&lt;SPAN&gt; node?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:39:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300375#M27574</guid>
      <dc:creator>DominickCisson</dc:creator>
      <dc:date>2014-05-07T13:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Format infoTemplate content with custom function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300376#M27575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Do you know of an example of how to add a &lt;STRONG&gt;real&lt;/STRONG&gt; attribute to a graphic?&amp;nbsp; and I'll second the original poster here, graphic.attr is &lt;SPAN style="text-decoration:underline;"&gt;very&lt;/SPAN&gt; confusing.&amp;nbsp; What exactly is the point of adding an attribute to a graphic's &lt;SPAN style="font-style:italic;"&gt;DOM&lt;/SPAN&gt; node?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Never mind... Figured it out.&amp;nbsp; It's JSON 101 Duh.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just set the attribute directly... graphic.attribute.&amp;lt;attribute name&amp;gt; = "New value"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 20:37:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-infotemplate-content-with-custom-function/m-p/300376#M27575</guid>
      <dc:creator>DominickCisson</dc:creator>
      <dc:date>2014-05-22T20:37:26Z</dc:date>
    </item>
  </channel>
</rss>

