<?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: Capture and Display Index in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/capture-and-display-index/m-p/468249#M43412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I see in some examples where it says 1 of 3 etc as the user scrolls through the selected list....but I cannot find the exact code in the examples as it seems a function of the widget&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jul 2014 17:51:09 GMT</pubDate>
    <dc:creator>jaykapalczynski</dc:creator>
    <dc:date>2014-07-03T17:51:09Z</dc:date>
    <item>
      <title>Capture and Display Index</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/capture-and-display-index/m-p/468248#M43411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am usign the below code to return results to a popup.&amp;nbsp; When there is more than one features returned it reports how many were found&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dom.byId("featureCount").innerHTML = popup.features.length + " feature(s) selected";
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Additionally&amp;nbsp; it allows the user to scroll through the returned features&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;popup.features.length &amp;gt; 1 ? domUtils.show(dom.byId("pager")) : domUtils.hide(dom.byId("pager"));
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now it will return "5 Feature(s) selected"&amp;nbsp; As I scroll through the list their attributes are shown but nothing more.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is can I capture the index of the feature being displayed as the user scrolls through the returned features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it will still say "5 Feature(s) selected" and below that it will return the index number of the one being displayed.&amp;nbsp; As they move through the list that index number will update itself...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This possible?&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;If so How do I get the index value of the feature being displayed at that given time? &lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; function initializeSidebar(map){

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var popup = map.infoWindow;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //when the selection changes update the side panel to display the popup info for the
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //currently selected feature.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect.connect(popup, "onSelectionChange", function(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; displayPopupContent(popup.getSelectedFeature());
&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; //when the selection is cleared remove the popup content from the side panel.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect.connect(popup, "onClearFeatures", function(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dom.byId("featureCount").innerHTML = "Looking for features";

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; registry.byId("leftPane").set("content", "");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; domUtils.hide(dom.byId("pager"));
&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; //When features are associated with the map's info window update the sidebar with the new content.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; connect.connect(popup, "onSetFeatures", function(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; displayPopupContent(popup.getSelectedFeature());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dom.byId("featureCount").innerHTML = popup.features.length + " feature(s) selected";

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //enable navigation if more than one feature is selected
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; popup.features.length &amp;gt; 1 ? domUtils.show(dom.byId("pager")) : domUtils.hide(dom.byId("pager"));

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });

}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 17:38:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/capture-and-display-index/m-p/468248#M43411</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2014-07-03T17:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Capture and Display Index</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/capture-and-display-index/m-p/468249#M43412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I see in some examples where it says 1 of 3 etc as the user scrolls through the selected list....but I cannot find the exact code in the examples as it seems a function of the widget&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 17:51:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/capture-and-display-index/m-p/468249#M43412</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2014-07-03T17:51:09Z</dc:date>
    </item>
  </channel>
</rss>

