<?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: creating nested tables in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41901#M9712</link>
    <description>&lt;P&gt;You could duplicate every event, and then blank out fields depending on whether it's an odd or even row.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Feb 2013 07:59:27 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2013-02-25T07:59:27Z</dc:date>
    <item>
      <title>creating nested tables</title>
      <link>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41900#M9711</link>
      <description>&lt;P&gt;Hi , my search is like specified below,&lt;BR /&gt;
Index=main source=file.txt xxx=*| stats values(a) values(b) values(c) by xxx&lt;BR /&gt;
Gives the table &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Xxx       values(a)        values(b)          values(c)
So       qq                sss               sss
Wqq      wewe              wewe              wew
we       wew               wew               wewe
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;can I change the layout of the table like this, I tried using append and appendcols, I know something I am missing please help to make the table like below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;xxx    values(a)        values(b)         values(c)
So
       Qq               sss               sss
Wqq
      Wewe              wewe              ww
We
      Ss                ss                 ss
Ss
     Ass               asa                 blaabla
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please help&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2013 05:44:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41900#M9711</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2013-02-25T05:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: creating nested tables</title>
      <link>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41901#M9712</link>
      <description>&lt;P&gt;You could duplicate every event, and then blank out fields depending on whether it's an odd or even row.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2013 07:59:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41901#M9712</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-25T07:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: creating nested tables</title>
      <link>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41902#M9713</link>
      <description>&lt;P&gt;Thanks martin, but is there something that i can duplicate table entries ?? and how to check the rownumber in splunk ??&lt;BR /&gt;
and one more issue is , what if one the table entries doesnt have a nested field?&lt;BR /&gt;
can u suggest something?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2013 08:53:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41902#M9713</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2013-02-25T08:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: creating nested tables</title>
      <link>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41903#M9714</link>
      <description>&lt;P&gt;For duplicating events look at mvexpand, for row numbers look at streamstats.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2013 09:09:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41903#M9714</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-25T09:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: creating nested tables</title>
      <link>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41904#M9715</link>
      <description>&lt;P&gt;appended streamstats count and it is working... but mvexpand is confusing,,&lt;BR /&gt;
if i do ...|Index=main source=file.txt xxx=*| stats values(a) values(b) values(c) by xxx |mvexpand values(a)|mvexpand(b)&lt;BR /&gt;
i am getting the same events, the table entries are not duplicated..&lt;BR /&gt;
tried something like&lt;BR /&gt;
mvzip(a,b)|rex field..&lt;BR /&gt;
still the same&lt;BR /&gt;
Am i doing it wrong?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2013 12:31:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41904#M9715</guid>
      <dc:creator>bellaed</dc:creator>
      <dc:date>2013-02-25T12:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: creating nested tables</title>
      <link>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41905#M9716</link>
      <description>&lt;P&gt;First, you appear to confuse your splunkbase accounts &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Second, mvexpand can only duplicate events if there is a multivalued field with more than one entry. Hence you need to create a temporary field with two values, mvexpand on that, then remove it again.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2013 12:44:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41905#M9716</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-25T12:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: creating nested tables</title>
      <link>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41906#M9717</link>
      <description>&lt;P&gt;After some emails,   smolcj and I discovered that the reason this solution was being pursued was just to improve the general readability of the Table.  That's to say the leftmost column was a really a header for the row,  and the request had come in to space things out in the table so that the header was higher than the content. &lt;/P&gt;

&lt;P&gt;I made the suggestion of looking into the Embedding feature of the Table module, because it would be dead-simple to just embed HTML modules into the particular cells as necessary so that the 'data' cells had some padding on the top edge.  &lt;/P&gt;

&lt;P&gt;And I hear that this has worked out well as the solution. &lt;/P&gt;

&lt;P&gt;Here's the code that smolcj used as a proof-of-concept, and if you haven't read the "Table - Custom Embedding" documentation in Sideview Utils,  this will look a little odd.  It basically takes all the "Connection" cells in the table and wraps each of them in a div that adds top padding so as to push down the data.  If done to all of the "data" cells, it would make the leftmost cell of each row look like a header for that row.  You could also use the same effect to wrap the leftmost values in &lt;CODE&gt;&amp;lt;b&amp;gt;&lt;/CODE&gt; tags or anything you like. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Search" layoutPanel="panel_row2_col1" autoRun="True"&amp;gt;
  &amp;lt;param name="search"&amp;gt;&amp;lt;![CDATA[
    index=infa sourcetype=session-log source=*SUCCESS* sess_trans_type=* | stats values(sess_trans_type) as Transtype,  values(sess_connection) as Connection, values(sess_codepage) as Codepage,  values(sess_sql_query) as Query by sess_trans_name
  ]]&amp;gt;&amp;lt;/param&amp;gt;

  &amp;lt;module name="Pager"&amp;gt;
    &amp;lt;param name="count"&amp;gt;5&amp;lt;/param&amp;gt;
    &amp;lt;module name="Table"&amp;gt;
      &amp;lt;param name="hiddenFields"&amp;gt;Codepage,Query&amp;lt;/param&amp;gt;
      &amp;lt;module name="HTML" group="row.fields.Connection"&amp;gt;
        &amp;lt;param name="html"&amp;gt;&amp;lt;![CDATA[
          &amp;lt;div style="padding-top:15px;width: 500px;"&amp;gt;
            Connection = &amp;lt;b&amp;gt;$row.fields.Connection$&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; Codepage = &amp;lt;b&amp;gt;$row.fields.Codepage$&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; 
          &amp;lt;/div&amp;gt;
        ]]&amp;gt;&amp;lt;/param&amp;gt;
      &amp;lt;/module&amp;gt;
    &amp;lt;/module&amp;gt;
  &amp;lt;/module&amp;gt;
&amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Feb 2013 05:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/creating-nested-tables/m-p/41906#M9717</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-26T05:36:56Z</dc:date>
    </item>
  </channel>
</rss>

