<?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: Popup, PopupTemplate, and InfoTemplate clear as mud in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258659#M23956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Molly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Sounds like your popup is not the actual map.infoWindow then.&lt;/P&gt;&lt;P&gt;You need to be using&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var feature = map.infoWindow.&lt;SPAN class="" style="color: #595959;"&gt;getSelectedFeature&lt;/SPAN&gt;();&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;method to get the currently selected feature in the popup.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Mar 2019 17:21:41 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2019-03-22T17:21:41Z</dc:date>
    <item>
      <title>Popup, PopupTemplate, and InfoTemplate clear as mud</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258654#M23951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the difference between these three? Do you have to define a popup object before you define a popup template? My understanding is that the popup template is the same as an info template, the only difference is that the popupTemplate lets you use graphs/pictures and do extra formatting. I think when I define a feature layer and it's properties, I can use a popupTemplate for the infoTemplate property, correct? Is myPopupTemplate.setContent() the same method as myInfoTemplate.setContent()? I create all the content for the popup dynamically, so I can't use fieldInfos or anything like that in the PopupTemplate. This is also why I can't use a "click" function on a feature that brings up the InfoTemplate, because if there are overlapping features (on the same feature layer) and a user uses the arrows on the popup, the click function won't fire again, thus the InfoTemplate does not update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This leaves me with a select-change event on a Popup object (if the select-change event does not fire when the arrows are used, then this whole question is moot and there is no solution to using arrows which would be dumb)...but I don't understand how that correlates with PopupTemplate/InfoTemplate/InfoWindow. Popup objects have their own setContent method. Do I not need a PopupTemplate or an InfoTemplate and instead just set the content and title using the Popup object's own methods?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my current code using an InfoTemplate. Note that the content for the InfoTemplate is fired on click of a feature and arrows on the popup do not act as a click. It would be great if there was a solution to the arrow problem while still using InfoTemplates so then I wouldn't have to mess with popup/popupTemplate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; mgmtTractPopupBox &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;InfoTemplate&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="comment token"&gt;//Add the habitat management tract feature layer&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; hbMgmtTractFL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://xxx/rest/services/HabitatMonitoring/HabitatData/MapServer/3"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    refreshInterval&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    mode&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; FeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MODE_ONDEMAND&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    visible&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    outFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"*"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    infoTemplate&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; mgmtTractPopupBox
&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;
hbMgmtTractFL&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setMinScale&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;500000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
hbMgmtTractFL&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setSelectionSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;selectionSym&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//Format mgmtTract popup content on click of a feature&lt;/SPAN&gt;
hbMgmtTractFL&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;"click"&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;feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; OID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OBJECTID&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;relatedTractAttrb&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;OID&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="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;relatedTractAttrb&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;oids&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; relate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;RelationshipQuery&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;
    relate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;objectIds &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;oids&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    relate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;relationshipId &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    relate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;outFields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'*'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    hbMgmtTractFL&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryRelatedFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;relate&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;fset&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; features &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fset&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;oids&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; rows &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'&amp;lt;table id="mgmtPopupTable1"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Veg Practice&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Herbicide&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Month Treated&amp;lt;/th&amp;gt;\
                    &amp;lt;th&amp;gt;Year Treated&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Implemented By&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Funded By&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Farm Bill Code&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;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="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; features&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="operator 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="keyword token"&gt;var&lt;/SPAN&gt; feature &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; features&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; vegPractice &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;vegPName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;VegMgmtPractice&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; herbicide &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;herbName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Herbicide&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; monthTreated &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;monthName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MonthTreated&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; yearTreated &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;YearTreated&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; impBy &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;impName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ImplementedBy&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fundBy &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;fundName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FundedBy&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fbc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FarmBillCode&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fundBy &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"CRP"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;||&lt;/SPAN&gt; fundBy &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"CRP - CREP"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                    fbc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;crpName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fbc&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="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fundBy &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"EQIP"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;||&lt;/SPAN&gt; fundBy &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"EQIP - RCPP"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                    fbc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;eqipName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fbc&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="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                    fbc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Not applicable"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; contentRow &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; vegPractice &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; herbicide &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; monthTreated &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; yearTreated &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;
                    &lt;SPAN class="string token"&gt;'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; impBy &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; fundBy &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; fbc &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                rows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;push&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;contentRow&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;
        content &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; rows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;join&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        content &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; content &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'&amp;lt;/table&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        mgmtTractPopupBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setTitle&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Habitat Management Tract ${OBJECTID}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        mgmtTractPopupBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setContent&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;content&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="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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&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;P&gt;&lt;/P&gt;&lt;P&gt;The documentation on all three of these things is incredibly confusing and I wish ESRI would clean it up&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:44:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258654#M23951</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2021-12-11T12:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Popup, PopupTemplate, and InfoTemplate clear as mud</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258655#M23952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Molly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Wow that is a lot of questions. Let me try and clear some things up for you.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;What is the difference between these three?&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Popup is a singleton dijit that a map has by default to show info in a bubble type dialog.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;PopupTemplate is a object that is used by the maps popup to format and extract certain info from a feature that has been set in the popups features property.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;InfoTemplate is the first generation of a template object that does what a PopupTemplate does but a little less.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Do you have to define a popup object before you define a popup template?&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;No a Map object by default has a Popup dijit as its infoWindow property.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;My understanding is that the popup template is the same as an info template, the only difference is that the PopupTemplate lets you use graphs/pictures and do extra formatting. I think when I define a feature layer and it's properties, I can use a PopupTemplate for the InfoTemplate property, correct?&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;You are absolutely correct InfoTemplate is the old object and&amp;nbsp;almost always you would want to use a PopupTemplate.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Now if you are setting your own content directly to the popup using setContent method, then there is no need for a template at all. Templates (either one) are just a means to pre-define how the attributes of the selected feature should be displayed.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Is myPopupTemplate.setContent() the same method as myInfoTemplate.setContent()?&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Basically Yes.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN&gt;I create all the content for the popup dynamically, so I can't use fieldInfos or anything like that in the PopupTemplate. This is also why I can't use a "click" function on a feature that brings up the InfoTemplate, because if there are overlapping features (on the same feature layer) and a user uses the arrows on the popup, the click function won't fire again, thus the InfoTemplate does not update.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In your use case there is no need at all to define the layer infoTemplate as you never use it. There is no need for you to use it either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you see a case when you will click on the map and have overlapping features?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so you can set the popups feature property using the setFeatures method and then just use the&amp;nbsp;selection-change event to determine the graphic that is going to be used when calling the map.infoWindow.setContent method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2019 14:46:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258655#M23952</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-03-21T14:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Popup, PopupTemplate, and InfoTemplate clear as mud</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258656#M23953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is helpful, thank you. I have other feature layers that use InfoTemplates; they are truly being formatted with stuff in curly brackets so I think those I do need to define, unlike the&amp;nbsp;one seen above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, to use the select-change event and setFeatures() I need to create a Popup object. BUT, I still need to use a click event to be able to differentiate between layers. The only layer that uses a click event is the layer seen above to bring up the popup since the content has to be calculated every time due to the related feature query. The others are InfoTemplates and nothing needs to be calculated, they are pre-defined before the layer is added to the map. So when I click on features in&amp;nbsp;the layer where they overlap, only one feature is retrieved; whatever the map designates as the one on "top."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;hbMgmtTractFL&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;"click"&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;feature &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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess my problem is that I don't understand how to use setFeatures(). If I set the features on the popup, I think it would only be setting the single feature that is on top when the overlapping features are clicked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;hbMgmtTractFL&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;"click"&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;feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
   myPopup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
   &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; OID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OBJECTID&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
   &lt;SPAN class="comment token"&gt;//call function to calculate content and do call map.infoWindow.setContent()&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code currently makes the InfoWindow/Popup flash when I click the overlapping features. It also&amp;nbsp; highlights all the geometry associated with the event point, when I just want it to highlight one feature at a time. I have not yet attempted to implement&amp;nbsp;select-change because I'm not sure where I would call it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;//Replace infoWindow with popup&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; popup &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Popup&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    fillSymbol &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; selectionSym
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; domConstruct&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;create&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"div"&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;

map &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"map"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    basemap&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"hybrid"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    center&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;85.603281&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;36.241294&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    zoom&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    infoWindow&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; popup
&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="comment token"&gt;//Add the habitat management tract feature layer&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; hbMgmtTractFL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://xxx/rest/services/HabitatMonitoring/HabitatData/MapServer/3"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    refreshInterval&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    mode&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; FeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MODE_ONDEMAND&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    visible&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    outFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string 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;
hbMgmtTractFL&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setMinScale&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;500000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
hbMgmtTractFL&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setSelectionSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;selectionSym&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//Format mgmtTract popup content on click of a feature&lt;/SPAN&gt;
hbMgmtTractFL&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;"click"&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;feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;//Does setFeatures() go here somewhere?&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;//popup.setFeatures(feature.graphic)  &amp;lt;-- Only one feature though.&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; OID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OBJECTID&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;relatedTractAttrb&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;OID&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="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;relatedTractAttrb&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;oids&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; relate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;RelationshipQuery&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;
    relate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;objectIds &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;oids&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    relate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;relationshipId &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    relate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;outFields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'*'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    hbMgmtTractFL&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryRelatedFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;relate&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;fset&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;//do stuff to create content&lt;/SPAN&gt;
        map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;infoWindow&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setTitle&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Habitat Management Tract "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; oids&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&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;
        map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;infoWindow&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setContent&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;content&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="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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&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;P&gt;&lt;/P&gt;&lt;P&gt;It works for the features with InfoTemplates defined perfectly. It's just the hbMgmtTractFL feature layer that I can't figure out, and I know it has something to do with that fact that the template is set in the click function... Clicking on other feature layers with InfoTemplates&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="lia-vid-container video-embed-center"&gt;&lt;DIV id="lia-vid-6162695506001w320h240r753" class="lia-video-brightcove-player-container"&gt;&lt;VIDEO-JS data-video-id="6162695506001" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/VIDEO-JS&gt;&lt;/DIV&gt;&lt;SCRIPT src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/SCRIPT&gt;&lt;A class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6162695506001" target="_blank"&gt;(view in My Videos)&lt;/A&gt;&lt;/DIV&gt;:&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:44:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258656#M23953</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2021-12-11T12:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Popup, PopupTemplate, and InfoTemplate clear as mud</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258657#M23954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Molly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You should reconsider your workflow. If you assign a popuptemplate for the&amp;nbsp;hbMgmtTractFL and remove your click event on it, then you can just listen for the map.infoWindow set-features event and if the layer equals&amp;nbsp;your&amp;nbsp;&lt;SPAN&gt;hbMgmtTractFL&amp;nbsp;then you can do your relationship query and set the content of the popup otherwise just let the popup widget do its own thing (for the other layers). Same thing for listening for the select-change event examine if the feature is from your specific layer and if so then do your query.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2019 16:47:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258657#M23954</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-03-22T16:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Popup, PopupTemplate, and InfoTemplate clear as mud</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258658#M23955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Edit: we were writing at the same time. Will read your response...... Now I've read it. That was my thought too, on a select-change event I should be able to see what layers are coming through. I can't access the features to determine the layer on a select-change event though, see below in my response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anything get returned by "selection-change"? Does not appear that it returns features or graphics. I also can't seem to access popup object properties, which I don't quite understand. For example, if I click on a feature in the map and look at the popup object in the console, I can see it has a features property (just as it is noted in the documentation). If I try to access the features property doing something like so:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; features &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; popup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;features&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I just get "undefined."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try to access the count property where I can see the popup has a count of 3 features, the count comes back as 0.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;popup&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//The count property displays "3"&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; count &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; popup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;count
console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;count&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//The count displays "0"‍‍‍‍‍‍‍‍‍‍‍‍&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;P&gt;&lt;/P&gt;&lt;P&gt;If I try to access the isShowing property of the popup, I get false even though the popup is displaying on the map.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; visible &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; popup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;isShowing
console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;visible&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only way I can do anything on a selection-change event is if I can access those features... there's also a million other issues such as my hbMgmtTractFL not even being recognized as a layer on the map by the popup object unless the InfoTemplate is set.&amp;nbsp; If the infoTemplate is set, then the features in that FL actually highlight, if it isn't only the background feature highlights (which is also a featureLayer with an infoTemplate set). A popup set-features event also is not accessible for determining layers, just tried it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:44:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258658#M23955</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2021-12-11T12:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Popup, PopupTemplate, and InfoTemplate clear as mud</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258659#M23956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Molly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Sounds like your popup is not the actual map.infoWindow then.&lt;/P&gt;&lt;P&gt;You need to be using&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var feature = map.infoWindow.&lt;SPAN class="" style="color: #595959;"&gt;getSelectedFeature&lt;/SPAN&gt;();&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;method to get the currently selected feature in the popup.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2019 17:21:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258659#M23956</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-03-22T17:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Popup, PopupTemplate, and InfoTemplate clear as mud</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258660#M23957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Robert, that finally got me where I needed to be. You've answered countless questions from me on this community, I do sincerely appreciate your patience!&lt;/P&gt;&lt;P&gt;If you wouldn't mind explaining more, how could my popup not be the actual map.infoWindow when I define it before I instantiate my map? Just trying to understand this better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;//Replace infoWindow with Popup object&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; popup &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Popup&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    fillSymbol&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SimpleFillSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SimpleFillSymbol&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;STYLE_SOLID&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SimpleLineSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SimpleLineSymbol&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;STYLE_SOLID&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Color&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;255&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&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="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Color&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;255&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;255&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0.25&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="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; domConstruct&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;create&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"div"&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="comment token"&gt;//Instantiate the map&lt;/SPAN&gt;
map &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"map"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    basemap&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"hybrid"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    center&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;85.603281&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;36.241294&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    zoom&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    infoWindow&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; popup
&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&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;P&gt;&lt;/P&gt;&lt;P&gt;The other question I have (sorry, I'm full of questions); is there anyway to avoid running the select-change event twice when you click on features that overlap?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If I click&amp;nbsp;where the green dot is, the selection-change event runs through twice, once for each feature, I assume because both features technically get selected, even though it only highlights one. The last feature that runs through the selection-change event is the one that gets highlighted, so the content in the popup shows&amp;nbsp;as I would expect it to.&amp;nbsp;Unfortunately, there isn't a .getSelectedFeature&lt;EM&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/EM&gt;() method that would return an array of selected features, so I don't think I can get just the one considered "on top" by using indexes. Not a huge deal as everything works fine, just wondering if I can avoid unnecessary processing somehow.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/440199_Capture.JPG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This ended up being the final code for the popup select-change event.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;popup&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;"selection-change"&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;
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; feature &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; popup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getSelectedFeature&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="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; undefined &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_graphicsLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MgmtTracts"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; OID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OBJECTID&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="token function"&gt;relatedTractAttrb&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;OID&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="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;/SPAN&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 12:44:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258660#M23957</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2021-12-11T12:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Popup, PopupTemplate, and InfoTemplate clear as mud</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258661#M23958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Molly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;That is strange. I am not sure why you popup was not being recognized as the popup in your code. But unless you were attempting to do something special with the popup (like put it in a panel) there is no need for you to create your own popup as the map object by default already has a Popup dijit as its infoWindow property.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately no there is no way to have the selection-change only fire once. It will fire as many times are it finds features and even when there are no features found because the selection is changed from something to nothing. What I would do is check the popup.location and if it is identical to the first time the selection-change method was called then bail out of the function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2019 15:27:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-popuptemplate-and-infotemplate-clear-as-mud/m-p/258661#M23958</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-03-23T15:27:43Z</dc:date>
    </item>
  </channel>
</rss>

