<?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 Information Summary Widget - Grouping Feature Classes in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/information-summary-widget-grouping-feature/m-p/861774#M11864</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am implementing an application in Web Appbuilder and am looking for a little assistance from some more senior developers with implementing some changes to the Information Summary Widget.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My clients have asked for the ability to have the widget group features.&lt;/P&gt;&lt;P&gt;In the below example you can see there are different types of project for Water, Wastewater and Roadways and they are stored in two different types of feature class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately to my knowledge there are no configuration settings to allow for this within the widget, so I have made some attempts at creating a facade to achieve this goal without overhauling the entire Widget.js file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the before&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;IMG __jive_id="473724" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/473724_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have written this basic code posted below. In the Chrome console I can run the pieces to perform the intended result.The issue arises when I go to implement the code into the Widget.js file where things go poorly.&lt;/P&gt;&lt;P&gt;In debugging the code of the widget to attempt to understand what is happening I have noticed that it passes through each feature class four times when refreshing the display, and this is where I am unsure where to implement my code to be performed after this is complete?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;//get the new sum from the first two layers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var number1 = parseInt(document.getElementById("recNum_CapitalSearch_4529_4599_1271").innerHTML.replace(",",""))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var number2 = parseInt(document.getElementById("recNum_CapitalSearch_9364_4752").innerHTML.replace(",",""))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var number3 = number1 + number2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f7f7f;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;//sets the new sum of values&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;document.getElementById("recNum_CapitalSearch_4529_4599_1271").innerHTML=number3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;//combine lists&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var table1 = document.getElementById("legend_CapitalSearch_4529_4599_1271")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var table2 = document.getElementById("legend_CapitalSearch_9364_4752")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var table3 = table1.innerHTML + table2.innerHTML&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;//sets the new values for the list&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;document.getElementById("legend_CapitalSearch_4529_4599_1271").innerHTML=table3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f7f7f;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;//hides the element not wanted&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;document.getElementById("rec_CapitalSearch_9364_4752").style.display="none"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 12.0pt;"&gt;&lt;STRONG&gt;Here is the code working for a single pass&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/473736_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: black;"&gt;Thank you for reading!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: black;"&gt;Kevin&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Nov 2019 18:48:03 GMT</pubDate>
    <dc:creator>KevinThompson</dc:creator>
    <dc:date>2019-11-18T18:48:03Z</dc:date>
    <item>
      <title>Information Summary Widget - Grouping Feature Classes</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/information-summary-widget-grouping-feature/m-p/861774#M11864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am implementing an application in Web Appbuilder and am looking for a little assistance from some more senior developers with implementing some changes to the Information Summary Widget.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My clients have asked for the ability to have the widget group features.&lt;/P&gt;&lt;P&gt;In the below example you can see there are different types of project for Water, Wastewater and Roadways and they are stored in two different types of feature class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately to my knowledge there are no configuration settings to allow for this within the widget, so I have made some attempts at creating a facade to achieve this goal without overhauling the entire Widget.js file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the before&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;IMG __jive_id="473724" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/473724_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have written this basic code posted below. In the Chrome console I can run the pieces to perform the intended result.The issue arises when I go to implement the code into the Widget.js file where things go poorly.&lt;/P&gt;&lt;P&gt;In debugging the code of the widget to attempt to understand what is happening I have noticed that it passes through each feature class four times when refreshing the display, and this is where I am unsure where to implement my code to be performed after this is complete?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;//get the new sum from the first two layers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var number1 = parseInt(document.getElementById("recNum_CapitalSearch_4529_4599_1271").innerHTML.replace(",",""))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var number2 = parseInt(document.getElementById("recNum_CapitalSearch_9364_4752").innerHTML.replace(",",""))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var number3 = number1 + number2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f7f7f;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;//sets the new sum of values&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;document.getElementById("recNum_CapitalSearch_4529_4599_1271").innerHTML=number3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;//combine lists&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var table1 = document.getElementById("legend_CapitalSearch_4529_4599_1271")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var table2 = document.getElementById("legend_CapitalSearch_9364_4752")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;var table3 = table1.innerHTML + table2.innerHTML&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;//sets the new values for the list&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;document.getElementById("legend_CapitalSearch_4529_4599_1271").innerHTML=table3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f7f7f;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;//hides the element not wanted&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: #7f7f7f;"&gt;document.getElementById("rec_CapitalSearch_9364_4752").style.display="none"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 12.0pt;"&gt;&lt;STRONG&gt;Here is the code working for a single pass&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/473736_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: black;"&gt;Thank you for reading!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; color: black;"&gt;Kevin&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2019 18:48:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/information-summary-widget-grouping-feature/m-p/861774#M11864</guid>
      <dc:creator>KevinThompson</dc:creator>
      <dc:date>2019-11-18T18:48:03Z</dc:date>
    </item>
  </channel>
</rss>

