<?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: Table Row Expansion in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636124#M52150</link>
    <description>&lt;LI-CODE lang="markup"&gt;&amp;lt;form version="1.1" script="a13.js"&amp;gt;
  &amp;lt;label&amp;gt;Detailed Campaign Classic&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="campaign"&amp;gt;
      &amp;lt;label&amp;gt;Campaign Selected&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;campaign_name&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;campaign_name&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index="fakt-remote" 
| search splunk_id=$splunk_id$
| spath output=testcase path=campaign_kpi_metrics{}
| mvexpand testcase | eval _raw=testcase | kv
| stats count by campaign_name&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;default&amp;gt;$campaign$&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="verdict" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Verdict&amp;lt;/label&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query/&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Passed"&amp;gt;Passed&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Failed"&amp;gt;Failed&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;$verdict$&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row depends="$hidden$"&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;style&amp;gt;
          td {
           line-height: 50px !important;
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="expand_with_events"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index="fakt-remote" splunk_id=$splunk_id$
| spath output=testcase path=campaign_kpi_metrics{}
| mvexpand testcase | eval _raw=testcase | kv
| rename testcases{}.verdict as Verdict, testcases{}.name as "Test Case" testcases{}.min_polqa as min_polqa testcases{}.min_polqa_thres as min_polqa_thres testcases{}.avg_polqa as avg_polqa testcases{}.avg_polqa_thres as avg_polqa_thres testcases{}.max_polqa as max_polqa testcases{}.max_polqa_thres as max_polqa_thres
| eval "Minimum / Threshold" = min_polqa." / ".min_polqa_thres, "Average / Threshold" = avg_polqa." / ".avg_polqa_thres, "Maximum / Threshold" = max_polqa." / ".max_polqa_thres
| search Verdict=$verdict$ campaign_name=$campaign$
| table "Test Case" "Minimum / Threshold" "Average / Threshold" "Maximum / Threshold" Verdict&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;100&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;format type="color" field="Verdict"&amp;gt;
          &amp;lt;colorPalette type="map"&amp;gt;{"Passed":#118832,"Failed":#D41F1F}&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 27 Mar 2023 10:03:57 GMT</pubDate>
    <dc:creator>aru949</dc:creator>
    <dc:date>2023-03-27T10:03:57Z</dc:date>
    <item>
      <title>How to create a table row expansion?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636028#M52134</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;I have a table like this :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aru949_0-1679757909946.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24531i2104D1B89B5EE87F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aru949_0-1679757909946.png" alt="aru949_0-1679757909946.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What I want to do is when I click on the "Test Case" value of a particular row, it should expand that row ( if possible only that particular cell) and display a table like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aru949_1-1679758064970.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24532i7DEC28BDFA7EA3A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aru949_1-1679758064970.png" alt="aru949_1-1679758064970.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Also I am using token (when clicking on the Test Case) to pass value to the second table. Any help would be appreciated&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 03:12:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636028#M52134</guid>
      <dc:creator>aru949</dc:creator>
      <dc:date>2023-03-27T03:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table row expansion?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636029#M52135</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/251289"&gt;@aru949&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see my this answer. I hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Building-for-the-Splunk-Platform/Table-row-expansion-with-dynamic-search-in-the-JS/m-p/561412" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Building-for-the-Splunk-Platform/Table-row-expansion-with-dynamic-search-in-the-JS/m-p/561412&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;If any of my replies help you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 06:07:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636029#M52135</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2023-03-27T06:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Table Row Expansion</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636030#M52136</link>
      <description>&lt;P&gt;I tried using this approach but it's getting a bit complicated for me as I'm new to splunk and it didn't work&lt;/P&gt;</description>
      <pubDate>Sat, 25 Mar 2023 16:21:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636030#M52136</guid>
      <dc:creator>aru949</dc:creator>
      <dc:date>2023-03-25T16:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Table Row Expansion</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636031#M52137</link>
      <description>&lt;P&gt;How to handle the tokens in the query?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require([
    'splunkjs/mvc/tableview',
    'splunkjs/mvc/chartview',
    'splunkjs/mvc/searchmanager',
    'splunkjs/mvc',
    'underscore',
    'splunkjs/mvc/simplexml/ready!'
], function(
    TableView,
    ChartView,
    SearchManager,
    mvc,
    _
) {
    console.log("HIe");
    var CustomRangeRenderer = TableView.BaseCellRenderer.extend({
        canRender: function(cell) {
            return cell.field;
        },
        render: function($container, rowData) {
            console.log(rowData.value);
            if (rowData.field === "Test Case") {
                $container.html(rowData.value.split("@@")[0])
            } else {
                $container.html(rowData.value)
            }
        }
    });
    var EventSearchBasedRowExpansionRenderer = TableView.BaseRowExpansionRenderer.extend({
        initialize: function(args) {
            // initialize will run once, so we will set up a search and a chart to be reused.
            this._searchManager = new SearchManager({
                preview: false
            }, { tokens: true, tokenNamespace: "submitted" });
            //this._chartView = new ChartView({
            //    managerid: 'details-search-manager',
            //    'charting.legend.placement': 'none'
            //});
            this._TableView = new TableView({
                managerid: this._searchManager.name,
                drilldown: 'cell'
            });
        },

        canRender: function(rowData) {
            // Since more than one row expansion renderer can be registered we let each decide if they can handle that
            // data
            // Here we will always handle it.
            return true;
        },

        render: function($container, rowData) {
            // rowData contains information about the row that is expanded.  We can see the cells, fields, and values
            // We will find the sourcetype cell to use its value
            var processCell = _(rowData.cells).find(function(cell) {
                return cell.field === 'Test Case';
            });

                //update the search with the sourcetype that we are interested in
                // this._searchManager.set({ search: 'index= "' + processCell.value + '" ' });
            value = processCell.value.split("@@")
            value = value[value.length - 1];
            this._searchManager.set({ search: 'index="fakt-remote" splunk_id=$splunk_id$ | spath output=meta_data path=campaign_test_case_meta_data{} | mvexpand meta_data | eval _raw=meta_data| kv | rename testcases{}.codec_type as "Codec Type" testcases{}.bit_rate as Bitrate testcases{}.mode as Mode testcases{}.level as Level testcases{}.pl_rate as "PL Rate" testcases{}.jitter as Jitter testcases{}.call_type as "Call Type" testcases{}.test_mode as "Test Mode" | search testcases{}.test_case_name = $name$ | table "Codec Type" Bitrate Mode Level "PL Rate" Jitter "Call Type" "Test Mode"'});

            // $container is the jquery object where we can put out content.
            // In this case we will render our chart and add it to the $container
            //$container.append(this._chartView.render().el);
            $container.append(this._TableView.render().el);
        }
    });

    var tableElement = mvc.Components.getInstance("expand_with_events");
    tableElement.getVisualization(function(tableView) {
        // Add custom cell renderer, the table will re-render automatically.
        tableView.table.addCellRenderer(new CustomRangeRenderer());
        tableView.render();
        tableView.addRowExpansionRenderer(new EventSearchBasedRowExpansionRenderer());
    });
});&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 25 Mar 2023 16:33:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636031#M52137</guid>
      <dc:creator>aru949</dc:creator>
      <dc:date>2023-03-25T16:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Table Row Expansion</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636092#M52147</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/251289"&gt;@aru949&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your code looks good to me. Maybe you need to do some changes in the table search. Can you please share your sample dashboard XML?&lt;/P&gt;&lt;P&gt;Sharing my Samlpe XML.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard script="expand_with_events.js"&amp;gt;
  &amp;lt;label&amp;gt;expand_with_events&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="expand_with_events"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index="_internal" | stats count by source | eval "Test Case" = source. "@@". count&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-1w@w1&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;@w1&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;condition&amp;gt;&amp;lt;/condition&amp;gt;
        &amp;lt;/drilldown&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Screenshot&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-03-27 at 11.31.48 AM.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24546i027A9ED220EEA36D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-03-27 at 11.31.48 AM.png" alt="Screenshot 2023-03-27 at 11.31.48 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;If any of my replies help you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 06:02:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636092#M52147</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2023-03-27T06:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Table Row Expansion</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636124#M52150</link>
      <description>&lt;LI-CODE lang="markup"&gt;&amp;lt;form version="1.1" script="a13.js"&amp;gt;
  &amp;lt;label&amp;gt;Detailed Campaign Classic&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="campaign"&amp;gt;
      &amp;lt;label&amp;gt;Campaign Selected&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;campaign_name&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;campaign_name&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index="fakt-remote" 
| search splunk_id=$splunk_id$
| spath output=testcase path=campaign_kpi_metrics{}
| mvexpand testcase | eval _raw=testcase | kv
| stats count by campaign_name&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;default&amp;gt;$campaign$&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="verdict" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Verdict&amp;lt;/label&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query/&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Passed"&amp;gt;Passed&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Failed"&amp;gt;Failed&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;$verdict$&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row depends="$hidden$"&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;style&amp;gt;
          td {
           line-height: 50px !important;
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="expand_with_events"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index="fakt-remote" splunk_id=$splunk_id$
| spath output=testcase path=campaign_kpi_metrics{}
| mvexpand testcase | eval _raw=testcase | kv
| rename testcases{}.verdict as Verdict, testcases{}.name as "Test Case" testcases{}.min_polqa as min_polqa testcases{}.min_polqa_thres as min_polqa_thres testcases{}.avg_polqa as avg_polqa testcases{}.avg_polqa_thres as avg_polqa_thres testcases{}.max_polqa as max_polqa testcases{}.max_polqa_thres as max_polqa_thres
| eval "Minimum / Threshold" = min_polqa." / ".min_polqa_thres, "Average / Threshold" = avg_polqa." / ".avg_polqa_thres, "Maximum / Threshold" = max_polqa." / ".max_polqa_thres
| search Verdict=$verdict$ campaign_name=$campaign$
| table "Test Case" "Minimum / Threshold" "Average / Threshold" "Maximum / Threshold" Verdict&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;100&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;format type="color" field="Verdict"&amp;gt;
          &amp;lt;colorPalette type="map"&amp;gt;{"Passed":#118832,"Failed":#D41F1F}&amp;lt;/colorPalette&amp;gt;
        &amp;lt;/format&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 27 Mar 2023 10:03:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636124#M52150</guid>
      <dc:creator>aru949</dc:creator>
      <dc:date>2023-03-27T10:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Table Row Expansion</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636125#M52151</link>
      <description>&lt;P&gt;Here is my js file&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require([
    'splunkjs/mvc/tableview',
    'splunkjs/mvc/chartview',
    'splunkjs/mvc/searchmanager',
    'splunkjs/mvc',
    'underscore',
    'splunkjs/mvc/simplexml/ready!'
], function(
    TableView,
    ChartView,
    SearchManager,
    mvc,
    _
) {
    console.log("HIe");
    var CustomRangeRenderer = TableView.BaseCellRenderer.extend({
        canRender: function(cell) {
            return cell.field;
        },
        render: function($container, rowData) {
            console.log(rowData.value);
            $container.html(rowData.value)
        }
    });
    var EventSearchBasedRowExpansionRenderer = TableView.BaseRowExpansionRenderer.extend({
        initialize: function(args) {
            // initialize will run once, so we will set up a search and a chart to be reused.
            this._searchManager = new SearchManager({
                preview: false
            }, { tokens: true, tokenNamespace: "submitted" });
            //this._chartView = new ChartView({
            //    managerid: 'details-search-manager',
            //    'charting.legend.placement': 'none'
            //});
            this._TableView = new TableView({
                managerid: this._searchManager.name,
                drilldown: 'cell'
            });
        },

        canRender: function(rowData) {
            // Since more than one row expansion renderer can be registered we let each decide if they can handle that
            // data
            // Here we will always handle it.
            return true;
        },

        render: function($container, rowData) {
            // rowData contains information about the row that is expanded.  We can see the cells, fields, and values
            // We will find the sourcetype cell to use its value
            var processCell = _(rowData.cells).find(function(cell) {
                return cell.field === 'Test Case';
            });

                //update the search with the sourcetype that we are interested in
                // this._searchManager.set({ search: 'index= "' + processCell.value + '" ' });
            value = processCell.value
            // value = value[value.length - 1];
            var tokens = mvc.Components.get("default")
            var id = tokens.get("splunk_id")
            this._searchManager.set({ search: 'index="fakt-remote" splunk_id="' + id + '" | spath output=meta_data path=campaign_test_case_meta_data{}.testcases{} | mvexpand meta_data | eval _raw=meta_data| kv | search test_case_name="' + value + '" | rename bit_rate as Bitrate call_type as "Call Type" codec_type as "Codec Type" delay as Delay disabled as Disabled dtx as DTX inp_file as "Input File" jitter as Jitter level as Level mode as Mode pl_rate as "PL Rate" polqa_iteration as "POLQA Iteration" ref_file as "Reference File" test_mode as "Test Mode" video as Video | table Bitrate "Call Type" "Codec Type" Delay Disabled DTX "Input File" Jitter Level Mode "PL Rate" "POLQA Iteration" "Reference File" "Test Mode" Video | eval name="Values" | transpose 0 header_field=name | rename column as Parameter'});

            // $container is the jquery object where we can put out content.
            // In this case we will render our chart and add it to the $container
            //$container.append(this._chartView.render().el);
            $container.append(this._TableView.render().el);
        }
    });

    var tableElement = mvc.Components.getInstance("expand_with_events");
    tableElement.getVisualization(function(tableView) {
        // Add custom cell renderer, the table will re-render automatically.
        tableView.table.addCellRenderer(new CustomRangeRenderer());
        tableView.render();
        tableView.addRowExpansionRenderer(new EventSearchBasedRowExpansionRenderer());
    });
});&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 27 Mar 2023 10:05:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636125#M52151</guid>
      <dc:creator>aru949</dc:creator>
      <dc:date>2023-03-27T10:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Table Row Expansion</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636127#M52152</link>
      <description>&lt;P class="lia-align-left"&gt;Im not able to click on the page 2 or Next in the expanded row&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aru949_0-1679911640113.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24549iCCCFBA9F31A013E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aru949_0-1679911640113.png" alt="aru949_0-1679911640113.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 10:07:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636127#M52152</guid>
      <dc:creator>aru949</dc:creator>
      <dc:date>2023-03-27T10:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Table Row Expansion</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636626#M52183</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/251289"&gt;@aru949&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your JS looks good and working fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-03-30 at 11.13.06 AM.png" style="width: 2040px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24625i1452BB2CED79D1B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-03-30 at 11.13.06 AM.png" alt="Screenshot 2023-03-30 at 11.13.06 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sharing js and XML both. Can you please create a new dashboard with it and trace back your code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require([
    'splunkjs/mvc/tableview',
    'splunkjs/mvc/chartview',
    'splunkjs/mvc/searchmanager',
    'splunkjs/mvc',
    'underscore',
    'splunkjs/mvc/simplexml/ready!'
], function(
    TableView,
    ChartView,
    SearchManager,
    mvc,
    _
) {
    console.log("HIe");
    var CustomRangeRenderer = TableView.BaseCellRenderer.extend({
        canRender: function(cell) {
            return cell.field;
        },
        render: function($container, rowData) {
            console.log(rowData.value);
            $container.html(rowData.value)
        }
    });
    var EventSearchBasedRowExpansionRenderer = TableView.BaseRowExpansionRenderer.extend({
        initialize: function(args) {
            // initialize will run once, so we will set up a search and a chart to be reused.
            this._searchManager = new SearchManager({
                preview: false
            }, { tokens: true, tokenNamespace: "submitted" });
            //this._chartView = new ChartView({
            //    managerid: 'details-search-manager',
            //    'charting.legend.placement': 'none'
            //});
            this._TableView = new TableView({
                managerid: this._searchManager.name,
                drilldown: 'cell'
            });
        },

        canRender: function(rowData) {
            // Since more than one row expansion renderer can be registered we let each decide if they can handle that
            // data
            // Here we will always handle it.
            return true;
        },

        render: function($container, rowData) {
            // rowData contains information about the row that is expanded.  We can see the cells, fields, and values
            // We will find the sourcetype cell to use its value
            var processCell = _(rowData.cells).find(function(cell) {
                return cell.field === 'Test Case';
            });

                //update the search with the sourcetype that we are interested in
                // this._searchManager.set({ search: 'index= "' + processCell.value + '" ' });
            value = processCell.value
            // value = value[value.length - 1];
            var tokens = mvc.Components.get("default")
            var id = tokens.get("splunk_id")
            this._searchManager.set({ search: '|makeresults count=100 | eval a="A", value="'+value+'",c=1 | accum c '});

            // $container is the jquery object where we can put out content.
            // In this case we will render our chart and add it to the $container
            //$container.append(this._chartView.render().el);
            $container.append(this._TableView.render().el);
        }
    });

    var tableElement = mvc.Components.getInstance("expand_with_events");
    tableElement.getVisualization(function(tableView) {
        // Add custom cell renderer, the table will re-render automatically.
        tableView.table.addCellRenderer(new CustomRangeRenderer());
        tableView.render();
        tableView.addRowExpansionRenderer(new EventSearchBasedRowExpansionRenderer());
    });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard script="expand_with_events.js"&amp;gt;
  &amp;lt;label&amp;gt;expand_with_events&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="expand_with_events"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index="_internal" | stats count by source | eval "Test Case" = source. "@@". count&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-1w@w1&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;@w1&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;condition&amp;gt;&amp;lt;/condition&amp;gt;
        &amp;lt;/drilldown&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;If any of my replies help you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 05:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-table-row-expansion/m-p/636626#M52183</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2023-03-30T05:45:32Z</dc:date>
    </item>
  </channel>
</rss>

