<?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 Filtering Chart Results in Cannot Access Data Error in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/filtering-chart-results-in-cannot-access-data/m-p/1390724#M9212</link>
    <description>&lt;P&gt;I'm using the following data expression for both my category selector and my serial chart widget.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Reference layer using the FeatureSetByPortalItem() method. 
var fs = FeatureSetByPortalItem(Portal('https://www.arcgis.com'), '404e68025b454f829385dfaa326d0486' , 0, ["*"], false);

// Empty dictionary to capture each sub topic reported as separate rows. 
var choicesDict = {'fields': [{ 'name': 'Split_SubTopic', 'type': 'esriFieldTypeString'}, { 'name': 'Topic', 'type': 'esriFieldTypeString'}, { 'name': 'Chamber', 'type': 'esriFieldTypeString'}, { 'name': 'Enacted', 'type': 'esriFieldTypeString'}], 
                    'geometryType': '', 
                    'features': []}; 

// Split comma separated sub types and store in dictionary.
for (var f in fs) {
  var Topic = f["Topic"]
  var Chamber = f["Chamber"]
  var Enacted = f["Enacted"]
  var split_array  =  Split(f["Sub_Topic"], ';')
  for(var i in split_array) {
    Push(choicesDict.features, {"attributes": {"Topic": Topic, "Chamber": Chamber, "Enacted": Enacted, "Split_SubTopic": Trim(split_array[i])}})
  }
}
var result = Replace(choicesDict, "_", " ");

// Convert dictionary to featureSet. 
var fs_dict = FeatureSet(Text(result));
return fs_dict&lt;/LI-CODE&gt;&lt;P&gt;In the serial chart I'm using categories from grouped values on the category field Split SubTopic.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArielLow2146_0-1709585270973.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96802i8986635C836C7798/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArielLow2146_0-1709585270973.png" alt="ArielLow2146_0-1709585270973.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the category selector I'm also using categories from grouped values with the category field of Split SubTopic.&lt;/P&gt;&lt;P&gt;The category selector works on widgets with other data sources but the serial chart with the same data expression as the source displays a "Cannot access data" error when it is filtered.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArielLow2146_1-1709585421930.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96804i6702A5527AE479EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArielLow2146_1-1709585421930.png" alt="ArielLow2146_1-1709585421930.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas why this might be?&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2024 20:50:48 GMT</pubDate>
    <dc:creator>ArielLow2146</dc:creator>
    <dc:date>2024-03-04T20:50:48Z</dc:date>
    <item>
      <title>Filtering Chart Results in Cannot Access Data Error</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filtering-chart-results-in-cannot-access-data/m-p/1390724#M9212</link>
      <description>&lt;P&gt;I'm using the following data expression for both my category selector and my serial chart widget.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Reference layer using the FeatureSetByPortalItem() method. 
var fs = FeatureSetByPortalItem(Portal('https://www.arcgis.com'), '404e68025b454f829385dfaa326d0486' , 0, ["*"], false);

// Empty dictionary to capture each sub topic reported as separate rows. 
var choicesDict = {'fields': [{ 'name': 'Split_SubTopic', 'type': 'esriFieldTypeString'}, { 'name': 'Topic', 'type': 'esriFieldTypeString'}, { 'name': 'Chamber', 'type': 'esriFieldTypeString'}, { 'name': 'Enacted', 'type': 'esriFieldTypeString'}], 
                    'geometryType': '', 
                    'features': []}; 

// Split comma separated sub types and store in dictionary.
for (var f in fs) {
  var Topic = f["Topic"]
  var Chamber = f["Chamber"]
  var Enacted = f["Enacted"]
  var split_array  =  Split(f["Sub_Topic"], ';')
  for(var i in split_array) {
    Push(choicesDict.features, {"attributes": {"Topic": Topic, "Chamber": Chamber, "Enacted": Enacted, "Split_SubTopic": Trim(split_array[i])}})
  }
}
var result = Replace(choicesDict, "_", " ");

// Convert dictionary to featureSet. 
var fs_dict = FeatureSet(Text(result));
return fs_dict&lt;/LI-CODE&gt;&lt;P&gt;In the serial chart I'm using categories from grouped values on the category field Split SubTopic.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArielLow2146_0-1709585270973.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96802i8986635C836C7798/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArielLow2146_0-1709585270973.png" alt="ArielLow2146_0-1709585270973.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the category selector I'm also using categories from grouped values with the category field of Split SubTopic.&lt;/P&gt;&lt;P&gt;The category selector works on widgets with other data sources but the serial chart with the same data expression as the source displays a "Cannot access data" error when it is filtered.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArielLow2146_1-1709585421930.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96804i6702A5527AE479EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArielLow2146_1-1709585421930.png" alt="ArielLow2146_1-1709585421930.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas why this might be?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 20:50:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filtering-chart-results-in-cannot-access-data/m-p/1390724#M9212</guid>
      <dc:creator>ArielLow2146</dc:creator>
      <dc:date>2024-03-04T20:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Chart Results in Cannot Access Data Error</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/filtering-chart-results-in-cannot-access-data/m-p/1391545#M9219</link>
      <description>&lt;P&gt;I was able to resolve this issue by removing the _ from the field name. I switched Split_SubTopic to SplitSubTopic.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 23:05:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/filtering-chart-results-in-cannot-access-data/m-p/1391545#M9219</guid>
      <dc:creator>ArielLow2146</dc:creator>
      <dc:date>2024-03-05T23:05:32Z</dc:date>
    </item>
  </channel>
</rss>

