<?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 dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124333#M33613</link>
    <description>&lt;P&gt;Hii Somesh,&lt;/P&gt;

&lt;P&gt;If you are using a Table command to populate the statistics table then I would suggest to do the following ,&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Dropdown :&lt;/STRONG&gt;  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;*&amp;lt;input type="dropdown" token="rowNo" searchWhenChanged="true"&amp;gt;
  &amp;lt;default&amp;gt;10&amp;lt;/default&amp;gt;
  &amp;lt;choice value="10"&amp;gt;10&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="20"&amp;gt;20&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="30"&amp;gt;30&amp;lt;/choice&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*&lt;EM&gt;Search Query to populate the table: *&lt;/EM&gt;  index = my_index | table a, b , c | head $rowNo$&lt;/P&gt;</description>
    <pubDate>Thu, 27 Nov 2014 10:40:51 GMT</pubDate>
    <dc:creator>jitsinha</dc:creator>
    <dc:date>2014-11-27T10:40:51Z</dc:date>
    <item>
      <title>How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124332#M33612</link>
      <description>&lt;P&gt;I am using Splunk 6.1.2 and have a panel with a table developed in simple xml.&lt;/P&gt;

&lt;P&gt;I would like to allow users to be able to choose the number of rows displayed in the table. &lt;/P&gt;

&lt;P&gt;I know that with write permissions, users can do Edit-&amp;gt;Edit Panel-&amp;gt;Table formatting and change the number of rows to be displayed, but I want to just read access to dashboard and maybe have a drop-down with values 5,10,15,20,50,100 and it should be used a no of rows displayed in the table.&lt;/P&gt;

&lt;P&gt;I tried with a drop-down with above values and tried to set the "count" property with the drop-down token like below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="count"&amp;gt;$noofrows$&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But this gives errors below error on saving launching&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;XML Syntax Error: invalid literal for int() with base 10: '$noofrows$'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Has anyone done something similar or have any better way to do it?&lt;/P&gt;

&lt;P&gt;Thanks in advanced.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2014 21:48:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124332#M33612</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-11-19T21:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124333#M33613</link>
      <description>&lt;P&gt;Hii Somesh,&lt;/P&gt;

&lt;P&gt;If you are using a Table command to populate the statistics table then I would suggest to do the following ,&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Dropdown :&lt;/STRONG&gt;  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;*&amp;lt;input type="dropdown" token="rowNo" searchWhenChanged="true"&amp;gt;
  &amp;lt;default&amp;gt;10&amp;lt;/default&amp;gt;
  &amp;lt;choice value="10"&amp;gt;10&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="20"&amp;gt;20&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="30"&amp;gt;30&amp;lt;/choice&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*&lt;EM&gt;Search Query to populate the table: *&lt;/EM&gt;  index = my_index | table a, b , c | head $rowNo$&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2014 10:40:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124333#M33613</guid>
      <dc:creator>jitsinha</dc:creator>
      <dc:date>2014-11-27T10:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124334#M33614</link>
      <description>&lt;P&gt;Did you ever find a working solution to this? The error still occurs as of v6.2.3&lt;/P&gt;

&lt;P&gt;I'm trying to do the same thing (and hence finding this unanswered post!).&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2015 04:33:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124334#M33614</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2015-06-26T04:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124335#M33615</link>
      <description>&lt;P&gt;Same here. A solution would be appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2016 14:46:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124335#M33615</guid>
      <dc:creator>akazarov</dc:creator>
      <dc:date>2016-04-07T14:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124336#M33616</link>
      <description>&lt;P&gt;Any solution for this? Trying to control number of rows displayed per page dynamically (With dropdown selected value)&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 10:45:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124336#M33616</guid>
      <dc:creator>kasu_praveen</dc:creator>
      <dc:date>2016-08-26T10:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124337#M33617</link>
      <description>&lt;P&gt;Add another vote.  tonumber($noofrows$) doesn't work either.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2016 02:00:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124337#M33617</guid>
      <dc:creator>DaveAW</dc:creator>
      <dc:date>2016-09-02T02:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124338#M33618</link>
      <description>&lt;P&gt;@jitsinha this is a nice solution for dynamically displaying top # of rows. I think Somesh and the  rest of us are trying to determine if there's a way to dynamically change the number of rows per page &lt;/P&gt;

&lt;P&gt;Currently this needs to be hard coded to be a  specific integer number&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;table&amp;gt;
...
...
&amp;lt;option name="count"&amp;gt;10&amp;lt;/option&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;it would be nice if we could have it be dynamically driven by a token&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;table&amp;gt;
...
...
&amp;lt;option name="count"&amp;gt;$dispRows_tok$&amp;lt;/option&amp;gt;
&amp;lt;/table&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;im guessing its not possible, but it would be nice to have in future updates.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 13:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124338#M33618</guid>
      <dc:creator>spammenot66</dc:creator>
      <dc:date>2016-09-09T13:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124339#M33619</link>
      <description>&lt;P&gt;Old post, but I was just trying to do something similar and wanted to share what I came up with.&lt;/P&gt;

&lt;P&gt;My Use Case:&lt;BR /&gt;
Table A and Table B are side-by-side on the same dashboard row. Table A will always show every row (between 15 and 40), but Table B will have hundreds of rows. I wanted the maximum rows of Table B to be dynamically constrained to the currently-displayed row count of Table A.&lt;/P&gt;

&lt;P&gt;My Solution:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Table A:
&amp;lt;search&amp;gt;
 &amp;lt;query&amp;gt;blahBlah&amp;lt;/query&amp;gt;
 &amp;lt;done&amp;gt;
  &amp;lt;eval token="rowsTableA"&amp;gt;tonumber('job.resultCount')&amp;lt;/eval&amp;gt;
 &amp;lt;/done&amp;gt;
&amp;lt;/search&amp;gt;

Table B:
&amp;lt;option name="count"&amp;gt;$rowsTableA$&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this might help someone if you're in a similar situation! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 14:35:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124339#M33619</guid>
      <dc:creator>apchandler</dc:creator>
      <dc:date>2017-03-21T14:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124340#M33620</link>
      <description>&lt;P&gt;If rowsTableA is evaluated to a value more then 100 - that this wont work. It defaults to show just 20 records in the table&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:05:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124340#M33620</guid>
      <dc:creator>arathig</dc:creator>
      <dc:date>2017-04-24T12:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124341#M33621</link>
      <description>&lt;P&gt;I downvoted this post because will not help - when the count is evaluated to more than 100&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:05:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124341#M33621</guid>
      <dc:creator>arathig</dc:creator>
      <dc:date>2017-04-24T12:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124342#M33622</link>
      <description>&lt;P&gt;@somesoni2, I just tested this in &lt;CODE&gt;Splunk Enterprise 7&lt;/CODE&gt; and I was able to pass &lt;CODE&gt;Number of Rows&lt;/CODE&gt; value from &lt;CODE&gt;Dropdown&lt;/CODE&gt; to &lt;CODE&gt;Table Simple XML configuration&lt;/CODE&gt;i.e. &lt;CODE&gt;&amp;lt;option name="count"&amp;gt;$tokRows$&amp;lt;/option&amp;gt;&lt;/CODE&gt;. Not sure which version it was fixed. Following is run any where dashboard for testing.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Table number of rows via token&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="tokRows" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Number Of Rows&amp;lt;/label&amp;gt;
      &amp;lt;choice value="5"&amp;gt;5&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="10"&amp;gt;10&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="20"&amp;gt;20&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="30"&amp;gt;30&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;5&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd log_level=*
|  stats count by component log_level&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;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;$tokRows$&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;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Nov 2017 10:42:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124342#M33622</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-07T10:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change number of rows displayed in the table with simple XML using Splunk 6.1.x?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124343#M33623</link>
      <description>&lt;P&gt;I was able to get this working in 6.6.3, but not in 6.3.1.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;     
     &amp;lt;input type="text" token="row_tok" searchWhenChanged="true"&amp;gt;
       &amp;lt;label&amp;gt;Number Of Rows&amp;lt;/label&amp;gt;
       &amp;lt;default&amp;gt;10&amp;lt;/default&amp;gt;
     &amp;lt;/input&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&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;$row_tok$&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jan 2018 10:02:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-change-number-of-rows-displayed-in-the-table/m-p/124343#M33623</guid>
      <dc:creator>Nextbeat</dc:creator>
      <dc:date>2018-01-05T10:02:32Z</dc:date>
    </item>
  </channel>
</rss>

