<?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: How to add show more and show less function to the table column? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657954#M54210</link>
    <description>&lt;P&gt;Help me understand why this 2 lines are for? I do have other fields other than values and sourcetype, need to apply this expansion for 2nd column.(column name= Values)&lt;/P&gt;&lt;P&gt;| eval C1=mvmap(C1, C1."_R".row)&lt;BR /&gt;| foreach 2 3 4 [ eval C&amp;amp;lt;&amp;amp;lt;FIELD&amp;amp;gt;&amp;amp;gt;=random() % 10000 ]&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2023 08:04:01 GMT</pubDate>
    <dc:creator>Rajini</dc:creator>
    <dc:date>2023-09-19T08:04:01Z</dc:date>
    <item>
      <title>How to add show more and show less function to the table column?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657881#M54201</link>
      <description>&lt;P&gt;Hello Everyone..&lt;/P&gt;&lt;P&gt;Please reply if you have any solution to add show more and show less function in splunk dashboard table column.&lt;/P&gt;&lt;P&gt;lets say there is one table with 4 columns - C1, C2, C3, C4 and 5 rows - R1, R2, R3, R4, R5.&lt;/P&gt;&lt;P&gt;Consider Column C2 has 1 value in R1, 10 values in R2, 4 values in R3, 5 values in R4, 2 values in R5.&lt;/P&gt;&lt;P&gt;I have to make 1 value to show as default and if there is value more than one then "show more" option should get enabled to expand the remaining details and "show less" option to collapse the expanded details.&lt;/P&gt;&lt;P&gt;Thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 12:22:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657881#M54201</guid>
      <dc:creator>Rajini</dc:creator>
      <dc:date>2023-09-18T12:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to add show more and show less function to the table column?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657930#M54206</link>
      <description>&lt;P&gt;There are a couple of ways you can do this, one with simple token usage and one with javascript.&lt;/P&gt;&lt;P&gt;For the JS, see the 'Table row expansion' example in the Splunk dashboard examples app&lt;/P&gt;&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/1603" target="_blank"&gt;https://splunkbase.splunk.com/app/1603&lt;/A&gt;&lt;/P&gt;&lt;P&gt;there are some simple examples there.&lt;/P&gt;&lt;P&gt;You can also do it something like this with tokens. This example dashboard shows how you can use a token to control what form of C1 looks like. See $tok_row$ usage.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form version="1.1"&amp;gt;
  &amp;lt;label&amp;gt;test&amp;lt;/label&amp;gt;
  &amp;lt;init&amp;gt;
    &amp;lt;set token="tok_row"&amp;gt;0&amp;lt;/set&amp;gt;
  &amp;lt;/init&amp;gt;
  &amp;lt;search id="base_data"&amp;gt;
    &amp;lt;query&amp;gt;
| makeresults count=5
| fields - _time
| streamstats c as row
``` lets say there is one table with 4 columns - C1, C2, C3, C4 and 5 rows - R1, R2, R3, R4, R5.
Consider Column C2 has 1 value in R1, 10 values in R2, 4 values in R3, 5 values in R4, 2 values in R5.```
| eval C1=case(row=1, "Value1", 
               row=2, split("Value1,Value2,Value3,Value4,Value5,Value6,Value7,Value8,Value9,Value10", ","),
               row=3, split("Value1,Value2,Value3,Value4", ","),
               row=4, split("Value1,Value2,Value3,Value4,Value5", ","),
               row=5, split("Value1,Value2", ","))
| eval C1=mvmap(C1, C1."_R".row)
| foreach 2 3 4 [  eval C&amp;amp;lt;&amp;amp;lt;FIELD&amp;amp;gt;&amp;amp;gt;=random() % 10000 ]
| eval C1_FULL=C1
    &amp;lt;/query&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search base="base_data"&amp;gt;
          &amp;lt;query&amp;gt;
| eval C1=if(row=$tok_row$, C1_FULL, mvindex(C1_FULL, 0, 0))
          &amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;fields&amp;gt;"C1","C2","C3","C4"&amp;lt;/fields&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;eval token="tok_row"&amp;gt;if($row.row$=$tok_row$, 0, $row.row$)&amp;lt;/eval&amp;gt;
        &amp;lt;/drilldown&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;&lt;P&gt;Hope this gives you some ideas&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 22:51:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657930#M54206</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-09-18T22:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to add show more and show less function to the table column?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657946#M54207</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp; This is exactly what i was looking for, and its excellent. Thank you for your response!&lt;/P&gt;&lt;P&gt;I tried your query its working great but when i implement the same to my query it is not working. it is still showing the multiple values and when i clicked on the row it is displaying "search is waiting for input.." message.&lt;/P&gt;&lt;P&gt;The results i am displaying is the values() through stats, please let me know if that could be the reason for not working or anything else?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 07:01:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657946#M54207</guid>
      <dc:creator>Rajini</dc:creator>
      <dc:date>2023-09-19T07:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to add show more and show less function to the table column?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657951#M54208</link>
      <description>&lt;P&gt;Search is waiting for input is a token problem, please post your XML search and drilldown segment&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 07:26:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657951#M54208</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-09-19T07:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add show more and show less function to the table column?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657953#M54209</link>
      <description>&lt;P&gt;Here is something similar to what i have tried. Please let me know where i might be making mistake.&lt;BR /&gt;&lt;BR /&gt;&amp;lt;form version="1.1" theme="dark"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;test&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;init&amp;gt;&lt;BR /&gt;&amp;lt;set token="tok_row"&amp;gt;0&amp;lt;/set&amp;gt;&lt;BR /&gt;&amp;lt;/init&amp;gt;&lt;BR /&gt;&amp;lt;search id="base_data"&amp;gt;&lt;BR /&gt;&amp;lt;query&amp;gt;index="_internal" earliest=-15m@m |stats values(source) as Values by sourcetype&lt;BR /&gt;| eval column_expansion=Values&lt;BR /&gt;&amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&amp;lt;row&amp;gt;&lt;BR /&gt;&amp;lt;panel&amp;gt;&lt;BR /&gt;&amp;lt;table&amp;gt;&lt;BR /&gt;&amp;lt;search base="base_data"&amp;gt;&lt;BR /&gt;&amp;lt;query&amp;gt;&lt;BR /&gt;| eval Values=if(row=$tok_row$, column_expansion, mvindex(column_expansion, 0, 0))&lt;BR /&gt;&amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&amp;lt;fields&amp;gt;"Values","sourcetype"&amp;lt;/fields&amp;gt;&lt;BR /&gt;&amp;lt;drilldown&amp;gt;&lt;BR /&gt;&amp;lt;eval token="tok_row"&amp;gt;if($row.row$=$tok_row$, 0, $row.row$)&amp;lt;/eval&amp;gt;&lt;BR /&gt;&amp;lt;/drilldown&amp;gt;&lt;BR /&gt;&amp;lt;/table&amp;gt;&lt;BR /&gt;&amp;lt;/panel&amp;gt;&lt;BR /&gt;&amp;lt;/row&amp;gt;&lt;BR /&gt;&amp;lt;/form&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 07:44:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657953#M54209</guid>
      <dc:creator>Rajini</dc:creator>
      <dc:date>2023-09-19T07:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to add show more and show less function to the table column?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657954#M54210</link>
      <description>&lt;P&gt;Help me understand why this 2 lines are for? I do have other fields other than values and sourcetype, need to apply this expansion for 2nd column.(column name= Values)&lt;/P&gt;&lt;P&gt;| eval C1=mvmap(C1, C1."_R".row)&lt;BR /&gt;| foreach 2 3 4 [ eval C&amp;amp;lt;&amp;amp;lt;FIELD&amp;amp;gt;&amp;amp;gt;=random() % 10000 ]&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 08:04:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657954#M54210</guid>
      <dc:creator>Rajini</dc:creator>
      <dc:date>2023-09-19T08:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to add show more and show less function to the table column?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657967#M54211</link>
      <description>&lt;P&gt;Yes, I figured out the cause, It is fixed now. Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 09:38:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657967#M54211</guid>
      <dc:creator>Rajini</dc:creator>
      <dc:date>2023-09-19T09:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to add show more and show less function to the table column?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657968#M54212</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/260665"&gt;@Rajini&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 09:39:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/657968#M54212</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-19T09:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to add show more and show less function to the table column?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/658058#M54220</link>
      <description>&lt;P&gt;That's just setting up dummy data for the example. The mvmap just concatenates ValueX with R.# to make each of the elements of C1 show the value + row number.&lt;/P&gt;&lt;P&gt;foreach just makes field C# equal to a random number, where # is a loop from 2, 3, 4 in the foreach.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 23:42:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-show-more-and-show-less-function-to-the-table-column/m-p/658058#M54220</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-09-19T23:42:29Z</dc:date>
    </item>
  </channel>
</rss>

