<?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 Filter Action from Serial Chart from Calculated Category in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-action-from-serial-chart-from-calculated/m-p/1593726#M10857</link>
    <description>&lt;P&gt;Is it possible for a serial chart based on a calculated category to have an action that filters a map or list drawn from the same feature layer?&lt;/P&gt;&lt;P&gt;I tried this. Categories for the serial chart are calculated in a data expression based on a hosted feature layer. The chart is correct. But when I add filter actions to the serial chart, it shows the source field is the calculated category field. I don't see a way to choose a different source field. Of course, I can choose any target field in the feature layer, but none of those fields will match the calculated field correctly.&lt;/P&gt;&lt;P&gt;Here's the data expression. The hazards field comes from a select_multiple field in Survey123 Connect.&lt;/P&gt;&lt;PRE&gt;var source = FeatureSetByPortalItem(Portal('redacted'), 'redacted', 0, ['objectid', 'hazards'], false);&lt;BR /&gt;var features = [];&lt;BR /&gt;for (var f in source) {&lt;BR /&gt;    if (f.hazards != null) {&lt;BR /&gt;        var parts = Split(f.hazards, ',');&lt;BR /&gt;        if (Includes(parts, 'Fire_Burning')) {&lt;BR /&gt;            Push(features, {attributes: {objectid: f.objectid, hazards: f.hazards, status: 'Burning'}});&lt;BR /&gt;        } else if (Includes(parts, 'Smoke')) {&lt;BR /&gt;            Push(features, {attributes: {objectid: f.objectid, hazards: f.hazards, status: 'Smoke'}});&lt;BR /&gt;        } else if (Includes(parts, 'Fire_Extinguished')) {&lt;BR /&gt;            Push(features, {attributes: {objectid: f.objectid, hazards: f.hazards, status: 'Out'}});&lt;BR /&gt;        }&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;var result = { &lt;BR /&gt;    geometryType: '', &lt;BR /&gt;    fields: [&lt;BR /&gt;        {name: 'objectid', 'type': 'esriFieldTypeInteger'},&lt;BR /&gt;        {name: 'hazards', 'type': 'esriFieldTypeString'},&lt;BR /&gt;        {name: 'status', 'type': 'esriFieldTypeString'},&lt;BR /&gt;    ], &lt;BR /&gt;    features: features,&lt;BR /&gt;};&lt;BR /&gt;return FeatureSet(Text(result));&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Mar 2025 05:36:18 GMT</pubDate>
    <dc:creator>JohnKristian</dc:creator>
    <dc:date>2025-03-10T05:36:18Z</dc:date>
    <item>
      <title>Filter Action from Serial Chart from Calculated Category</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filter-action-from-serial-chart-from-calculated/m-p/1593726#M10857</link>
      <description>&lt;P&gt;Is it possible for a serial chart based on a calculated category to have an action that filters a map or list drawn from the same feature layer?&lt;/P&gt;&lt;P&gt;I tried this. Categories for the serial chart are calculated in a data expression based on a hosted feature layer. The chart is correct. But when I add filter actions to the serial chart, it shows the source field is the calculated category field. I don't see a way to choose a different source field. Of course, I can choose any target field in the feature layer, but none of those fields will match the calculated field correctly.&lt;/P&gt;&lt;P&gt;Here's the data expression. The hazards field comes from a select_multiple field in Survey123 Connect.&lt;/P&gt;&lt;PRE&gt;var source = FeatureSetByPortalItem(Portal('redacted'), 'redacted', 0, ['objectid', 'hazards'], false);&lt;BR /&gt;var features = [];&lt;BR /&gt;for (var f in source) {&lt;BR /&gt;    if (f.hazards != null) {&lt;BR /&gt;        var parts = Split(f.hazards, ',');&lt;BR /&gt;        if (Includes(parts, 'Fire_Burning')) {&lt;BR /&gt;            Push(features, {attributes: {objectid: f.objectid, hazards: f.hazards, status: 'Burning'}});&lt;BR /&gt;        } else if (Includes(parts, 'Smoke')) {&lt;BR /&gt;            Push(features, {attributes: {objectid: f.objectid, hazards: f.hazards, status: 'Smoke'}});&lt;BR /&gt;        } else if (Includes(parts, 'Fire_Extinguished')) {&lt;BR /&gt;            Push(features, {attributes: {objectid: f.objectid, hazards: f.hazards, status: 'Out'}});&lt;BR /&gt;        }&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;var result = { &lt;BR /&gt;    geometryType: '', &lt;BR /&gt;    fields: [&lt;BR /&gt;        {name: 'objectid', 'type': 'esriFieldTypeInteger'},&lt;BR /&gt;        {name: 'hazards', 'type': 'esriFieldTypeString'},&lt;BR /&gt;        {name: 'status', 'type': 'esriFieldTypeString'},&lt;BR /&gt;    ], &lt;BR /&gt;    features: features,&lt;BR /&gt;};&lt;BR /&gt;return FeatureSet(Text(result));&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 05:36:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filter-action-from-serial-chart-from-calculated/m-p/1593726#M10857</guid>
      <dc:creator>JohnKristian</dc:creator>
      <dc:date>2025-03-10T05:36:18Z</dc:date>
    </item>
  </channel>
</rss>

