<?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: Text Widget to Dynamically Count Features based on Field Value in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/text-widget-to-dynamically-count-features-based-on/m-p/1629391#M19706</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffreyThompson2_0-1751468336569.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/135611iDE444D4A5619D094/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffreyThompson2_0-1751468336569.png" alt="JeffreyThompson2_0-1751468336569.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Could you set up Data Views to handle the SQL part of the problem? I don't think this should significantly impact performance.&lt;/P&gt;&lt;P&gt;You should be able to use Count on the OBJECTIDs to find the total number of records in the filtered dataset.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jul 2025 15:03:17 GMT</pubDate>
    <dc:creator>JeffreyThompson2</dc:creator>
    <dc:date>2025-07-02T15:03:17Z</dc:date>
    <item>
      <title>Text Widget to Dynamically Count Features based on Field Value</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/text-widget-to-dynamically-count-features-based-on/m-p/1629194#M19682</link>
      <description>&lt;P&gt;I'm trying to set up a text widget with a dynamic count of features filtered by a field (e.g. RecordType = Club). The count will change based on map extent and user-selected filters. But I've found that:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;There is no direct way to filter based on a field within the text widget.&lt;/LI&gt;&lt;LI&gt;The Expression module does not accept sql statements like 'where'.&lt;/LI&gt;&lt;LI&gt;I have fields that are only populated for clubs, e.g. 'ClubAffiliation' but a Count of these returns the count of distinct values, not the total number of values (as stated in the documentation).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;My data has a large number of features (up to 20,000) and will have a lot of concurrent users, so I'm conscious of performance. So trying to avoid using Arcade or creating Views just for this purpose.&lt;/P&gt;&lt;P&gt;Any ideas or wisdom, thanks?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 04:00:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/text-widget-to-dynamically-count-features-based-on/m-p/1629194#M19682</guid>
      <dc:creator>DarraghOSullivan</dc:creator>
      <dc:date>2025-07-02T04:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Text Widget to Dynamically Count Features based on Field Value</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/text-widget-to-dynamically-count-features-based-on/m-p/1629214#M19687</link>
      <description>&lt;P&gt;we have a similar use case and use an imbedded dashboard element&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StuartMoore_0-1751434277677.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/135580i7B430B8B103D408F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StuartMoore_0-1751434277677.png" alt="StuartMoore_0-1751434277677.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;that only shows the number based on the current users audit failures&lt;BR /&gt;this is the dashboard bit&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StuartMoore_1-1751434331328.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/135581i78A0CB5FE2C2B55F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StuartMoore_1-1751434331328.png" alt="StuartMoore_1-1751434331328.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;// Write an expression that returns a FeatureSet.
// Documentation: https://arcg.is/3c419TD
// Samples: https://arcg.is/HPbi00

var features = FeatureSetByPortalItem( Portal('https://www.arcgis.com'), '3e9...790d', 1, ['*'], false);
var currentusr = GetUser().username;
var filterwhere = "Audit_Status in ('In Progress') and Survey_by = '"+currentusr+"'" //'Open','In Progress','Query'
var result = Filter(features, filterwhere);
return result;&lt;/LI-CODE&gt;&lt;P&gt;i set the dashboard to refresh every 15 minutes or so&lt;/P&gt;&lt;P&gt;see if that fits the bill&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 05:33:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/text-widget-to-dynamically-count-features-based-on/m-p/1629214#M19687</guid>
      <dc:creator>StuartMoore</dc:creator>
      <dc:date>2025-07-02T05:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Text Widget to Dynamically Count Features based on Field Value</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/text-widget-to-dynamically-count-features-based-on/m-p/1629237#M19691</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/159798"&gt;@StuartMoore&lt;/a&gt;&amp;nbsp;. I think with Arcade now possible within a text widget in ExB, it would be more efficient than a dashboard embed. I also need continuous refresh, even as the main map pans etc.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 07:07:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/text-widget-to-dynamically-count-features-based-on/m-p/1629237#M19691</guid>
      <dc:creator>DarraghOSullivan</dc:creator>
      <dc:date>2025-07-02T07:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Text Widget to Dynamically Count Features based on Field Value</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/text-widget-to-dynamically-count-features-based-on/m-p/1629391#M19706</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffreyThompson2_0-1751468336569.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/135611iDE444D4A5619D094/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffreyThompson2_0-1751468336569.png" alt="JeffreyThompson2_0-1751468336569.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Could you set up Data Views to handle the SQL part of the problem? I don't think this should significantly impact performance.&lt;/P&gt;&lt;P&gt;You should be able to use Count on the OBJECTIDs to find the total number of records in the filtered dataset.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 15:03:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/text-widget-to-dynamically-count-features-based-on/m-p/1629391#M19706</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2025-07-02T15:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Text Widget to Dynamically Count Features based on Field Value</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/text-widget-to-dynamically-count-features-based-on/m-p/1629718#M19732</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/677423"&gt;@JeffreyThompson2&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Yes I might do that but was trying to avoid views with thousands of features if possible for something that seems quite simple! If setting up views, is it more efficient to set them up within ExB or externally, where I can reduce the fields etc?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2025 03:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/text-widget-to-dynamically-count-features-based-on/m-p/1629718#M19732</guid>
      <dc:creator>DarraghOSullivan</dc:creator>
      <dc:date>2025-07-03T03:55:31Z</dc:date>
    </item>
  </channel>
</rss>

