<?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: Add newline into table cell? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81023#M34368</link>
    <description>&lt;P&gt;This was extremely useful. I have been looking for this for long. &lt;BR /&gt;
Thank you @nagendra008&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jan 2018 21:14:19 GMT</pubDate>
    <dc:creator>harry2007gsp</dc:creator>
    <dc:date>2018-01-09T21:14:19Z</dc:date>
    <item>
      <title>Add newline into table cell?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81016#M34361</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm splunking some network traffic and want to generate a table showing the peak hour for different categories of data, for each day through a week. To add some context I'd like to embed more information (e.g. total throughput) into the table cell which I can do using eval to generate a result string.&lt;/P&gt;

&lt;P&gt;Is there any way of creating a newline within the result string so that the values wrap onto multiple lines? &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2012 20:59:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81016#M34361</guid>
      <dc:creator>inglisn</dc:creator>
      <dc:date>2012-02-28T20:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Add newline into table cell?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81017#M34362</link>
      <description>&lt;P&gt;You can do this by tweaking the CSS for the table you want wrapped text in (so you might need to create your own app so your CSS tweak doesn't affect everything else as well...)&lt;/P&gt;

&lt;P&gt;To get wrapped text in the results table, define the following CSS in &lt;CODE&gt;&amp;lt;app_root&amp;gt;/appserver/static/application.css&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.SimpleResultsTable table.simpleResultsTable {
    white-space:pre-line;
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Feb 2012 21:17:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81017#M34362</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-02-28T21:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Add newline into table cell?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81018#M34363</link>
      <description>&lt;P&gt;Thanks. Works well, although getting into the guts of CSS is something I was hoping to avoid.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2012 22:09:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81018#M34363</guid>
      <dc:creator>inglisn</dc:creator>
      <dc:date>2012-02-28T22:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Add newline into table cell?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81019#M34364</link>
      <description>&lt;P&gt;Hi inglisn,&lt;/P&gt;

&lt;P&gt;If you want to see the newline inside the table cell.&lt;BR /&gt;
I tried using [ yoursearch | rex mode=sed field=Category "s/,/\n/g" | ....  ], But i see space instead of newline.&lt;/P&gt;

&lt;P&gt;Try this if you have a delimiter in the string for a field Category like shown in example :  Cat1, Cat2 &lt;BR /&gt;
you can try to use split ( your search  |eval Category = split(Category,",")| ....... )  after using all the methods split works fine for my case.&lt;BR /&gt;
Hope this will help you.&lt;/P&gt;

&lt;P&gt;Example :&lt;/P&gt;

&lt;P&gt;No          Category         Count&lt;BR /&gt;
1             Cat1, Cat2           5&lt;BR /&gt;
2             Cat5, Cat6           9&lt;/P&gt;

&lt;P&gt;Desired output :&lt;/P&gt;

&lt;P&gt;No          Category         Count&lt;BR /&gt;
1                  Cat1                 5&lt;BR /&gt;
                    Cat2&lt;BR /&gt;&lt;BR /&gt;
2                  Cat5                 9&lt;BR /&gt;
                    Cat6           &lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 05:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81019#M34364</guid>
      <dc:creator>nagendra008</dc:creator>
      <dc:date>2016-03-09T05:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Add newline into table cell?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81020#M34365</link>
      <description>&lt;P&gt;Using split works for me.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 01:08:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81020#M34365</guid>
      <dc:creator>ZacEsa</dc:creator>
      <dc:date>2016-08-17T01:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add newline into table cell?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81021#M34366</link>
      <description>&lt;P&gt;Split worked for me as well...!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2016 04:26:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81021#M34366</guid>
      <dc:creator>marcellodesales</dc:creator>
      <dc:date>2016-09-22T04:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add newline into table cell?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81022#M34367</link>
      <description>&lt;P&gt;Split worked great, just what I was looking for!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 15:14:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81022#M34367</guid>
      <dc:creator>bsanch2</dc:creator>
      <dc:date>2016-10-27T15:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add newline into table cell?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81023#M34368</link>
      <description>&lt;P&gt;This was extremely useful. I have been looking for this for long. &lt;BR /&gt;
Thank you @nagendra008&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 21:14:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/81023#M34368</guid>
      <dc:creator>harry2007gsp</dc:creator>
      <dc:date>2018-01-09T21:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Add newline into table cell?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/514249#M34369</link>
      <description>&lt;P&gt;thanks!&amp;nbsp; this worked great for me as well.&amp;nbsp; (nagendra008 's split method , not the css way)&lt;/P&gt;&lt;P&gt;(i didnt want to mess with CSS nor make a new app for a quick table).&lt;/P&gt;&lt;P&gt;if this helps others,&amp;nbsp; i used the blank space as the linebreak / replace char;&lt;/P&gt;&lt;P&gt;| eval dateonly=strftime(_time, "%m-%d %A %I:%M%P") | &lt;STRONG&gt;eval dateonly= split(dateonly," ")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;so i ended up with exactly what i wanted&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; -&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="spunk311z_0-1597515299128.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10274i9EFD67092B957F3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="spunk311z_0-1597515299128.png" alt="spunk311z_0-1597515299128.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;vs this before&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="spunk311z_0-1597515404832.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10275iE165A9A937FE220C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="spunk311z_0-1597515404832.png" alt="spunk311z_0-1597515404832.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(unrelated- what is up with the login process for the forums here?&amp;nbsp; its now login on page 1, pw on page2, which breaks chrome and FF password save/remember.&amp;nbsp; maybe they are doing this to fight off bruteforce/bots?&amp;nbsp; etherway its pretty annoying as i now have to lookup + type both &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Aug 2020 18:18:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Add-newline-into-table-cell/m-p/514249#M34369</guid>
      <dc:creator>spunk311z</dc:creator>
      <dc:date>2020-08-15T18:18:52Z</dc:date>
    </item>
  </channel>
</rss>

