<?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: Why am I losing table formatting when using the replace command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-losing-table-formatting-when-using-the-replace-command/m-p/433563#M123777</link>
    <description>&lt;P&gt;I solved my own problem by using a simple CSS style. I don't know if It's the right way but it works.&lt;BR /&gt;
 If you have any other solution, i'll be glad to hear and discuss about. Tks&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;panel&amp;gt;
          &amp;lt;html depends="$alwaysHideCSS$"&amp;gt;
             &amp;lt;style&amp;gt;
                   #table_to_change .table th, .table td {
                        text-align: right!important;
                    }
             &amp;lt;/style&amp;gt;
         &amp;lt;/html&amp;gt;
          &amp;lt;table&amp;gt;
            &amp;lt;search id="table_to_change" base="base"&amp;gt;
              &amp;lt;query&amp;gt; "Your query goes here :)" &amp;lt;/query&amp;gt;
            &amp;lt;/search&amp;gt;
            &amp;lt;option name="count"&amp;gt;50&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="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
          &amp;lt;/table&amp;gt;
        &amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 23 Oct 2018 13:26:01 GMT</pubDate>
    <dc:creator>ppatrikfr</dc:creator>
    <dc:date>2018-10-23T13:26:01Z</dc:date>
    <item>
      <title>Why am I losing table formatting when using the replace command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-losing-table-formatting-when-using-the-replace-command/m-p/433562#M123776</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;I have a search that i want to take zeros off of. But, when i do it with replace, it loses its table formatting. Can anyone help me?&lt;/P&gt;

&lt;P&gt;Obs.: As I'm using the timechart command, I can't use "if statement" in search because column names always change.&lt;/P&gt;

&lt;P&gt;Code block i'm allowed to post!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart span=1mon count by "Secao" limit=0 usenull=f useother=f cont=false 
| eval mes=strftime(_time,"%B %Y") 
| fields - _time span _spandays 
| transpose 0 header_field=mes column_name="Secao" 
| eval Secao=if(Secao="NULL","Other",Secao) 
| eval Departamento=if(Departamento="NULL","Other",Departamento) 
| eval Equipe=if(Equipe="NULL","Other",Equipe) 
| addtotals
| replace "0" with " "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Before replace: &lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5948i683ECFA58E1E913B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;After replace:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5949iA091A61D8319B9BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 13:06:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-losing-table-formatting-when-using-the-replace-command/m-p/433562#M123776</guid>
      <dc:creator>ppatrikfr</dc:creator>
      <dc:date>2018-10-23T13:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I losing table formatting when using the replace command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-losing-table-formatting-when-using-the-replace-command/m-p/433563#M123777</link>
      <description>&lt;P&gt;I solved my own problem by using a simple CSS style. I don't know if It's the right way but it works.&lt;BR /&gt;
 If you have any other solution, i'll be glad to hear and discuss about. Tks&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;panel&amp;gt;
          &amp;lt;html depends="$alwaysHideCSS$"&amp;gt;
             &amp;lt;style&amp;gt;
                   #table_to_change .table th, .table td {
                        text-align: right!important;
                    }
             &amp;lt;/style&amp;gt;
         &amp;lt;/html&amp;gt;
          &amp;lt;table&amp;gt;
            &amp;lt;search id="table_to_change" base="base"&amp;gt;
              &amp;lt;query&amp;gt; "Your query goes here :)" &amp;lt;/query&amp;gt;
            &amp;lt;/search&amp;gt;
            &amp;lt;option name="count"&amp;gt;50&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="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
          &amp;lt;/table&amp;gt;
        &amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Oct 2018 13:26:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-losing-table-formatting-when-using-the-replace-command/m-p/433563#M123777</guid>
      <dc:creator>ppatrikfr</dc:creator>
      <dc:date>2018-10-23T13:26:01Z</dc:date>
    </item>
  </channel>
</rss>

