<?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: Dropdown in Table column in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-dropdown-in-table-column/m-p/630025#M51671</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/251289"&gt;@aru949&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand: you want to click on a value of a table and open another panel in the same dashboard (or another dashboard) containing more detailed information about the clicked value, is it correct?&lt;/P&gt;&lt;P&gt;if this is your need, see in the Splunk Dashboard Examples App (&lt;A href="https://splunkbase.splunk.com/app/1603" target="_blank"&gt;https://splunkbase.splunk.com/app/1603&lt;/A&gt;) the On Page Drilldown example.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 07:40:40 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-02-08T07:40:40Z</dc:date>
    <item>
      <title>How to add dropdown in table column?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-dropdown-in-table-column/m-p/630012#M51670</link>
      <description>&lt;P&gt;I want to add dropdown menu to a table value. Each value in a row should be a collapsable dropdown giving the description of the value. For example if my column entry has a value R_5, if I click on it, it should expand and show me as radius=5. I am able to do use a tooltip for this but want a dropdown instead.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 17:20:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-dropdown-in-table-column/m-p/630012#M51670</guid>
      <dc:creator>aru949</dc:creator>
      <dc:date>2023-02-08T17:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown in Table column</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-dropdown-in-table-column/m-p/630025#M51671</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/251289"&gt;@aru949&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand: you want to click on a value of a table and open another panel in the same dashboard (or another dashboard) containing more detailed information about the clicked value, is it correct?&lt;/P&gt;&lt;P&gt;if this is your need, see in the Splunk Dashboard Examples App (&lt;A href="https://splunkbase.splunk.com/app/1603" target="_blank"&gt;https://splunkbase.splunk.com/app/1603&lt;/A&gt;) the On Page Drilldown example.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 07:40:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-dropdown-in-table-column/m-p/630025#M51671</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-02-08T07:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown in Table column</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-dropdown-in-table-column/m-p/630026#M51672</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the that particular table cell to expand like a dropdown menu.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 07:43:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-dropdown-in-table-column/m-p/630026#M51672</guid>
      <dc:creator>aru949</dc:creator>
      <dc:date>2023-02-08T07:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown in Table column</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-dropdown-in-table-column/m-p/630029#M51673</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/251289"&gt;@aru949&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm not sure that's possible, you should explore, still in the Splunk Dashboard Examples App, if the "Table Raw Expansion" case could be something near to your requirement.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 07:47:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-dropdown-in-table-column/m-p/630029#M51673</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-02-08T07:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to add dropdown in table column?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-dropdown-in-table-column/m-p/630231#M51680</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;Can you please try this?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;XML&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard version="1.1" script="a.js"&amp;gt;
  &amp;lt;label&amp;gt;Table Cell with Dropdown&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="tbl1"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults count=10 
| eval n=1 
| accum n 
| eval my_column="R_".n&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Js.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require([
    'underscore',
    'jquery',
    'splunkjs/mvc',
    'splunkjs/mvc/tableview',
    'splunkjs/mvc/simplexml/ready!'
], function(_, $, mvc, TableView) {
    // Add dropdown to table
    var CustomRangeRenderer = TableView.BaseCellRenderer.extend({
        canRender: function(cell) {
            return _(["my_column"]).contains(cell.field);
        },
        render: function($td, cell) {
            console.log(cell.field);
            if (cell.field === "my_column") {
                if(cell.value == "R_5") {
                    var strHtmlInput = `
                        &amp;lt;select&amp;gt;
                            &amp;lt;option value="AM"&amp;gt;AM&amp;lt;/option&amp;gt;
                            &amp;lt;option value="AIL"&amp;gt;AIL&amp;lt;/option&amp;gt;
                            &amp;lt;option value="NEB"&amp;gt;NEB&amp;lt;/option&amp;gt;
                            &amp;lt;option value="SSP"&amp;gt;SSP&amp;lt;/option&amp;gt;
                        &amp;lt;/select&amp;gt;
                        `;
                    $td.append(strHtmlInput).on("change", function(e) {
                        console.log(e.target.value)
                    });
                } 
                else {
                    $td.append(cell.value);
                }
            }
        }
});

    var sh = mvc.Components.get("tbl1");
    if (typeof(sh) != "undefined") {
        sh.getVisualization(function(tableView) {
            // Add custom cell renderer and force re-render
            tableView.table.addCellRenderer(new CustomRangeRenderer());
            tableView.table.render();
        });
    }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: You can change dropdown values as per your requirement.&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>Thu, 09 Feb 2023 06:41:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-dropdown-in-table-column/m-p/630231#M51680</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2023-02-09T06:41:35Z</dc:date>
    </item>
  </channel>
</rss>

