<?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: Issue with dynamic content in a text widget in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/issue-with-dynamic-content-in-a-text-widget/m-p/1688497#M22704</link>
    <description>&lt;P&gt;Hi Nicole,&lt;/P&gt;&lt;P&gt;Haha, that is genius in its simplicity! I'm actually trying to learn how to code, so I will try Venkat's suggestion first, and if I can't get that to work, resort to naming my expression 0.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 04 Mar 2026 21:09:17 GMT</pubDate>
    <dc:creator>Tim_C</dc:creator>
    <dc:date>2026-03-04T21:09:17Z</dc:date>
    <item>
      <title>Issue with dynamic content in a text widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/issue-with-dynamic-content-in-a-text-widget/m-p/1688092#M22670</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a text widget that is linked to an interactive map. the widget displays information relating to cycling infrastructure, and has two expressions: one that indicates the total length of cycle track (a type of cycling infrastructure) based on the map extent, and the other, percent of total network based on the map extent.&lt;/P&gt;&lt;P&gt;For example, if there is a total of 10 kilometres of cycling infrastructure displayed on the map, and there's 2 kilometres of cycle track infrastructure, then the widget would display: CYCLE TRACK 2 Km Total Length, 20% of Total Network.&lt;/P&gt;&lt;P&gt;My issue is with the expression I'm using for percent of total network:&lt;/P&gt;&lt;P&gt;SUM({Length_km})/SUM({Length_km})*100&lt;/P&gt;&lt;P&gt;The first SUM being the total length of Cycle Track, the second SUM being the total length of all cycling infrastructure. The widget is connected to two Views: the default view and one with the filter: Cycling Infrastructure is Cycle Track.&lt;/P&gt;&lt;P&gt;The issue with this expression is that when I zoom into an area that has no cycling infrastructure, the widget displays: CYCLE TRACK 0 Km Total Length, Expression 1% of Total Network&lt;/P&gt;&lt;P&gt;Can someone help me edit this arcade expression so that when either the numerator or denominator of the expression has a value of zero, the widget displays: 0% of Total Network&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Data_connected.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149223iC92CA8EFC60966F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Data_connected.png" alt="Data_connected.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Data_connected.png&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expression_error.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149224i3797061521C42C4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Expression_error.png" alt="Expression_error.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Expression_error.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 18:14:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/issue-with-dynamic-content-in-a-text-widget/m-p/1688092#M22670</guid>
      <dc:creator>Tim_C</dc:creator>
      <dc:date>2026-03-03T18:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with dynamic content in a text widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/issue-with-dynamic-content-in-a-text-widget/m-p/1688146#M22675</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/711394"&gt;@Tim_C&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I think you might be getting into an issue with dividing by zero when you are outside.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Get your numerator and denominator values
var cycleTrackSum = SUM({Length_km}); // Numerator (Filtered View)
var totalNetworkSum = SUM({Length_km}); // Denominator (Default View)

// Check if the total network is zero or null
// If it is, return 0. Otherwise, perform the calculation.
var percent = IIF(totalNetworkSum &amp;gt; 0, (cycleTrackSum / totalNetworkSum) * 100, 0);

return Round(percent, 0) + "% of Total Network";&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Please refer the link below for more information on IIF function reference.&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/arcade/guide/logic/" target="_blank"&gt;If - else | ArcGIS Arcade | Esri Developer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this helps and let me know.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 19:58:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/issue-with-dynamic-content-in-a-text-widget/m-p/1688146#M22675</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2026-03-03T19:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with dynamic content in a text widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/issue-with-dynamic-content-in-a-text-widget/m-p/1688306#M22695</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/711394"&gt;@Tim_C&lt;/a&gt;, it's just defaulting to showing the name of your expression, which you can rename.&amp;nbsp;For example, here's a quick (non-sensical) example I put together with expressions showing how much of the population in view is part of Michigan. The top dynamic text has a generic expression name, and the bottom I've named "0%":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-03-04 082743.png" style="width: 257px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149281i2C9B1C4C94D17A46/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-03-04 082743.png" alt="Screenshot 2026-03-04 082743.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Screenshot 2026-03-04 082743.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Recording 2026-03-04 082514.gif" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149280i946ACD6D93A8C959/image-size/large?v=v2&amp;amp;px=999" role="button" title="Recording 2026-03-04 082514.gif" alt="Recording 2026-03-04 082514.gif" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Recording 2026-03-04 082514.gif&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 13:28:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/issue-with-dynamic-content-in-a-text-widget/m-p/1688306#M22695</guid>
      <dc:creator>NicoleJohnson</dc:creator>
      <dc:date>2026-03-04T13:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with dynamic content in a text widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/issue-with-dynamic-content-in-a-text-widget/m-p/1688497#M22704</link>
      <description>&lt;P&gt;Hi Nicole,&lt;/P&gt;&lt;P&gt;Haha, that is genius in its simplicity! I'm actually trying to learn how to code, so I will try Venkat's suggestion first, and if I can't get that to work, resort to naming my expression 0.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 21:09:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/issue-with-dynamic-content-in-a-text-widget/m-p/1688497#M22704</guid>
      <dc:creator>Tim_C</dc:creator>
      <dc:date>2026-03-04T21:09:17Z</dc:date>
    </item>
  </channel>
</rss>

