<?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: Identify - exclude tabs / contentpanes with no features returned in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544330#M50688</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;David,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've done something similar to what Diana suggested and I think it is similar to what you are attempting to do. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using dgrid to present a variable number of grids in separate tabs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only "non-standard" thing about my setup is that I have an intermediatery service between my client and my map server which performs the query via REST and formats the results in a specific way before passing it back to the client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i.e. The json that my service returns is formatted as below such that it is easy to create the dgrid object. To be honest I'm not sure this is a great idea and I'm yet to convince myself to keep it this way... but for now it works. &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "title":"Sites",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "columns":{"SLOT_TYPE_CD":"Slot Type Code","USER_REF_ID":"Site Id"},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "features":[
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"SLOT_TYPE_CD":"XX","USER_REF_ID":"P123456-A"},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"SLOT_TYPE_CD":"YY","USER_REF_ID":"P123456-B"}
&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; "title":"Properties",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "columns":{"PLAN":"Plan No.","LOCALITY":"Suburb","LOT":"Lot No."},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "features":[
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"PLAN":"RP12345","LOCALITY":"Somewhereville","LOT":"1"},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"PLAN":"RP54321","LOCALITY":"Somewhereville","LOT":"2"}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
]&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the function called from the map "onclick" sets a variable (called "resultSet" in the code below) to be the above json string returned from my service, it then calls the function to display the popup window with it's tabs as so...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function displayIdentify(evt) {

&amp;nbsp;&amp;nbsp;&amp;nbsp; // destroy any existing/leftover identify dijit 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (dijit.byId("identifyResults")) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dijit.byId("identifyResults").destroy();
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // create the tab container
&amp;nbsp;&amp;nbsp;&amp;nbsp; var tc = new dijit.layout.TabContainer({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: "identifyResults",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style: "height: 300px; width: 100%;"&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; }, dojo.create("div"));&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // for each record in the resultset, create a dgrid and add it to the tabcontainer
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0; i &amp;lt; resultSet.length; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var featureType = resultSet&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;&amp;nbsp; var columns = featureType.columns;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var data = featureType.features;


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var grid = new dgrid.Grid({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columns: columns
&amp;nbsp;&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;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.renderArray(data);&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; tc.addChild(new dijit.layout.ContentPane({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title: featureType.title,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style: "height: 100%; width: 100%",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content: grid.domNode
&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; map.infoWindow.setTitle("Identify results");
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setContent(tc.domNode);
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.show(evt.mapPoint);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; dijit.byId("identifyResults").resize();
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; hideLoading();
}
&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 23:33:21 GMT</pubDate>
    <dc:creator>TimCollyer</dc:creator>
    <dc:date>2021-12-11T23:33:21Z</dc:date>
    <item>
      <title>Identify - exclude tabs / contentpanes with no features returned</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544324#M50682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm working on a webmap that identifies on 10 layers in a dynamicmapservice.&amp;nbsp; The results are displayed in a tabcontainer with 10 tabs or contentpanes.&amp;nbsp; I'm trying to exclude or hide the tabs or contantpanes where no results are returned.&amp;nbsp; So...if the user clicks the map and only two layers include features at that location, only 2 tabs will appear in the popup (instead of all 10).&amp;nbsp; I thought I could edit the code for each layer in the layertabcontent function, but my attempts have failed so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated.&amp;nbsp; I'll attach the complete code as a Word file.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 14:03:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544324#M50682</guid>
      <dc:creator>DavidBoyd</dc:creator>
      <dc:date>2013-01-30T14:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Identify - exclude tabs / contentpanes with no features returned</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544325#M50683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you considered adding the Tabs on the fly once you get your reslutls?&amp;nbsp; For example, you can loop through the results array and add a tab for each feature class results.&amp;nbsp; Otherwise, you will need to get the dojo dijit tab container and remove the child tabcontainer or figure out what the hide property is for the tab container tabs.&amp;nbsp; This is just a suggestion, there are of course many different ways to do this. Good luck&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//quick example on how to create a simple tab container (non AMD)
//this code would be within your loop of results
//you would generate the content on the fly and get the layername from the results for each ...
var tab1 = new dijit.layout.ContentPane({
&amp;nbsp;&amp;nbsp;&amp;nbsp; title: "myTabTitle1",
&amp;nbsp;&amp;nbsp;&amp;nbsp; selected: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp; content: "point to the content the create on the fly here for 1st identify results"
&amp;nbsp; });
dijit.byId("myTabcontainer").addChild(tab1);

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:33:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544325#M50683</guid>
      <dc:creator>DianaBenedict</dc:creator>
      <dc:date>2021-12-11T23:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Identify - exclude tabs / contentpanes with no features returned</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544326#M50684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Diana!&amp;nbsp; I'll try this approach and code you posted.&amp;nbsp; I looked into hiding the child tab container and couldn't get it to work.&amp;nbsp; I'm still new to javascript so I'm not surprised it didn't work.&amp;nbsp; I appreciate your reply!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 15:37:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544326#M50684</guid>
      <dc:creator>DavidBoyd</dc:creator>
      <dc:date>2013-01-30T15:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Identify - exclude tabs / contentpanes with no features returned</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544327#M50685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Have you considered adding the Tabs on the fly once you get your reslutls?&amp;nbsp; For example, you can loop through the results array and add a tab for each feature class results.&amp;nbsp; Otherwise, you will need to get the dojo dijit tab container and remove the child tabcontainer or figure out what the hide property is for the tab container tabs.&amp;nbsp; This is just a suggestion, there are of course many different ways to do this. Good luck&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;//quick example on how to create a simple tab container (non AMD) //this code would be within your loop of results //you would generate the content on the fly and get the layername from the results for each ... var tab1 = new dijit.layout.ContentPane({ &amp;nbsp;&amp;nbsp;&amp;nbsp; title: "myTabTitle1", &amp;nbsp;&amp;nbsp;&amp;nbsp; selected: true, &amp;nbsp;&amp;nbsp;&amp;nbsp; content: "point to the content the create on the fly here for 1st identify results" &amp;nbsp; }); dijit.byId("myTabcontainer").addChild(tab1); &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Happy to help.&amp;nbsp; Not sure if you are already doing this, but I would use the following example as a guide to help you build your content. &lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/find_drilldown" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/find_drilldown&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Essentially, you will need to do something similar to what they do in the example above &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) take your identifyResults and reorganize them into groups of featureclassName and/or ID with array of respective fetures &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) after you have "resorted" the identify results then you can loop through each feature class in your new object (above) and &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; a) create the content&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; b) create your new tab&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; c) bind the content to the tab&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) don't forget to removeChild tabs from the TabContainer before you add all the new child Tabs&amp;nbsp; ... this might be the first thing you do&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like (if tabcontainer has childtabs then remove all child tabs .. can't remember but I think there is a pretty simple method to do that in Dojo&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good Luck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 16:33:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544327#M50685</guid>
      <dc:creator>DianaBenedict</dc:creator>
      <dc:date>2013-01-30T16:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Identify - exclude tabs / contentpanes with no features returned</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544328#M50686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, my code follows the example pretty closely, with a few differences.&amp;nbsp; I tried adding the removeChild at the if/else part of the script where the tab contents are set up.&amp;nbsp; I'm not sure if this is the right place to do it and I doubt I did it correctly.&amp;nbsp; Right now if an identify doesn't intersect any features, it just doesn't display the whole tabcontainer.&amp;nbsp; I just want to exclude the landsTab.&amp;nbsp; "tc" is the variable name for the tabcontainer in the previous function...not sure I used that correctly.&amp;nbsp; Here's the section I edited:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; if(layerName === "landsResults"){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(layerResults.features.length &amp;gt; 0){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content = "&amp;lt;i&amp;gt;Conservation Lands returned: " + layerResults.features.length +&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;/i&amp;gt;";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content += "&amp;lt;table border='1'&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Label&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Land Type&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Manager&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Weblink&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i=0, il=layerResults.features.length; i&amp;lt;il; i++) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content+="&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;"+layerResults.features&lt;I&gt;.attributes['LABEL']+" &amp;lt;a href='#' onclick='showFeature(" + layerName + ".features[" + i + "]); return false;'&amp;gt;(show)&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;";&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content+="&amp;lt;td&amp;gt;"+layerResults.features&lt;I&gt;.attributes['MATYPE']+"&amp;lt;/td&amp;gt;";&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content+="&amp;lt;td&amp;gt;"+layerResults.features&lt;I&gt;.attributes['MAAGENCY']+"&amp;lt;/td&amp;gt;";&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content+="&amp;lt;td&amp;gt;"+" &amp;lt;a href=" + layerResults.features&lt;I&gt;.attributes['LANDLINK'] + " target=_blank ;'&amp;gt;More Info&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;";&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content+="&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dijit.byId("tc").removeChild(landsTab);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 19:48:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544328#M50686</guid>
      <dc:creator>DavidBoyd</dc:creator>
      <dc:date>2013-02-22T19:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Identify - exclude tabs / contentpanes with no features returned</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544329#M50687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if(layerName === "landsResults"){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(layerResults.features.length &amp;gt; 0){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content = "&amp;lt;i&amp;gt;Conservation Lands returned: " + layerResults.features.length +&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;/i&amp;gt;";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content += .....&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dijit.byId("tc").removeChild(landsTab);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure what "landTab" is but here is the syntax that I got from dojo&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;dijit.byId('MyTabContainer').removeChild(dijit.byId('MyTab'));&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not to derail you too much but I ask .. why do you want your results seperated into tabs?&amp;nbsp; I believe that if you loop through your featureset and creaet an info template for each GRAPHIC and set the content then you can pass the featureset to a popup template or InfoWindow. Both of these Windows will allow you to navigate to each record with a built in "Next" and "Previous" buttons.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#Graphic/setInfoTemplate" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#Graphic/setInfoTemplate&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Obviously, the major disadvantage to this is that the users will need to navigate to each record to see the results for each "Layer". Whereas your method allows the user to quickly visualize the selected records per "tab".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you choose the Tab Page method then I might suggest that you create some methods to quickly remove All child tabs and add them dynamically each time an Identify task is executed. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
if (tabControl.hasChildren()) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var tabControlChildren = tabControl.getChildren();
//loop through tabcontrol and remove all children...
}
//call code to add all tabs based on the unique list of IdentifyResult.LayerName.
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck ...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:33:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544329#M50687</guid>
      <dc:creator>DianaBenedict</dc:creator>
      <dc:date>2021-12-11T23:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Identify - exclude tabs / contentpanes with no features returned</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544330#M50688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;David,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've done something similar to what Diana suggested and I think it is similar to what you are attempting to do. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using dgrid to present a variable number of grids in separate tabs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only "non-standard" thing about my setup is that I have an intermediatery service between my client and my map server which performs the query via REST and formats the results in a specific way before passing it back to the client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i.e. The json that my service returns is formatted as below such that it is easy to create the dgrid object. To be honest I'm not sure this is a great idea and I'm yet to convince myself to keep it this way... but for now it works. &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "title":"Sites",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "columns":{"SLOT_TYPE_CD":"Slot Type Code","USER_REF_ID":"Site Id"},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "features":[
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"SLOT_TYPE_CD":"XX","USER_REF_ID":"P123456-A"},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"SLOT_TYPE_CD":"YY","USER_REF_ID":"P123456-B"}
&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; "title":"Properties",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "columns":{"PLAN":"Plan No.","LOCALITY":"Suburb","LOT":"Lot No."},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "features":[
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"PLAN":"RP12345","LOCALITY":"Somewhereville","LOT":"1"},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {"PLAN":"RP54321","LOCALITY":"Somewhereville","LOT":"2"}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
]&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the function called from the map "onclick" sets a variable (called "resultSet" in the code below) to be the above json string returned from my service, it then calls the function to display the popup window with it's tabs as so...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function displayIdentify(evt) {

&amp;nbsp;&amp;nbsp;&amp;nbsp; // destroy any existing/leftover identify dijit 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (dijit.byId("identifyResults")) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dijit.byId("identifyResults").destroy();
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // create the tab container
&amp;nbsp;&amp;nbsp;&amp;nbsp; var tc = new dijit.layout.TabContainer({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: "identifyResults",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style: "height: 300px; width: 100%;"&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; }, dojo.create("div"));&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // for each record in the resultset, create a dgrid and add it to the tabcontainer
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0; i &amp;lt; resultSet.length; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var featureType = resultSet&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;&amp;nbsp; var columns = featureType.columns;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var data = featureType.features;


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var grid = new dgrid.Grid({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columns: columns
&amp;nbsp;&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;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.renderArray(data);&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; tc.addChild(new dijit.layout.ContentPane({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title: featureType.title,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style: "height: 100%; width: 100%",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content: grid.domNode
&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; map.infoWindow.setTitle("Identify results");
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setContent(tc.domNode);
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.show(evt.mapPoint);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; dijit.byId("identifyResults").resize();
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; hideLoading();
}
&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:33:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544330#M50688</guid>
      <dc:creator>TimCollyer</dc:creator>
      <dc:date>2021-12-11T23:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Identify - exclude tabs / contentpanes with no features returned</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544331#M50689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So, I'm still trying to follow Diane's example and struggling with it.&amp;nbsp; I'm still very much a beginner and trying to understand how all of the functions interact, how to call variables, and general javascript stuff.&amp;nbsp; I added the following line to my code to remove the child tab (landsTab) from the main tab container (tc) if the results were blank:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dijit.byId("tc").removeChild(dijit.byId('landsTab'));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Obviously I'm not doing something correctly, and the problem may be elsewhere in the code.&amp;nbsp; When I click on the map where "lands" are present, the identify works properly.&amp;nbsp; If no lands are present the whole tab container just doesn't come up at all.&amp;nbsp; Instead I'm trying to get it to just remove the childTab named "landsTab" if no lands are present.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Diane mentioned removing all childtabs before all of this...would that be within the function addToMap(idResults, evt)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One of these days I might get it!&amp;nbsp; Any more pointers you can provide are appreciated.&amp;nbsp; Sorry to be such a slow learner.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 18:36:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-exclude-tabs-contentpanes-with-no/m-p/544331#M50689</guid>
      <dc:creator>DavidBoyd</dc:creator>
      <dc:date>2013-03-01T18:36:17Z</dc:date>
    </item>
  </channel>
</rss>

