<?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 convert a field value of single line to displayed as multilines? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-field-value-of-single-line-to-displayed-as/m-p/593225#M206477</link>
    <description>&lt;P&gt;An alternative to embedding newlines into the eval, you can do it with mvappend, e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval body = mvappend("Sample Example :-","HOST INFORMATION: ", "Source Network Address: ".src, "Source Network Hostname: ". srcdns_hostname, "END ")&lt;/LI-CODE&gt;&lt;P&gt;Note that this results in a different field compared to&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;solution - that form will give you a single value field with embedded newlines, whereas mvappend gives you a multi-value field with each line a separate value of the field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Apr 2022 01:21:12 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2022-04-11T01:21:12Z</dc:date>
    <item>
      <title>How to convert a field value of single line to displayed as multilines?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-field-value-of-single-line-to-displayed-as/m-p/593220#M206474</link>
      <description>&lt;P&gt;Hi Splunkers,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have defined a filed as follows using eval condition&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval body = "Sample Example :-" . 
" ---- " . " HOST INFORMATION: " . 
" ---- Source Network Address: " . src . 
" ---- Source Network Hostname: " . srcdns_hostname . 
" ---- " . " END "&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which produces the result as follows&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sample.PNG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19018i692A85DE404FD2B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="sample.PNG" alt="sample.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now, I would like to change the above result into the below format how can I achieve that&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sample Example :- 
HOST INFORMATION: 
Source Network Address: 1.1.3.5 
Source Network Hostname: ABCD.net
END &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 15:40:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-field-value-of-single-line-to-displayed-as/m-p/593220#M206474</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2022-04-11T15:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert a field value of single line to displayed as multilines?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-field-value-of-single-line-to-displayed-as/m-p/593222#M206475</link>
      <description>&lt;P&gt;&amp;nbsp;Insert newlines in your &lt;FONT face="courier new,courier"&gt;eval&lt;/FONT&gt; using CTRL-Enter.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval body = "Sample Example :- 
HOST INFORMATION: 
Source Network Address: " . src . "
Source Network Hostname: " . srcdns_hostname . " 
END "&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 00:07:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-field-value-of-single-line-to-displayed-as/m-p/593222#M206475</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-04-11T00:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert a field value of single line to displayed as multilines?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-field-value-of-single-line-to-displayed-as/m-p/593225#M206477</link>
      <description>&lt;P&gt;An alternative to embedding newlines into the eval, you can do it with mvappend, e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval body = mvappend("Sample Example :-","HOST INFORMATION: ", "Source Network Address: ".src, "Source Network Hostname: ". srcdns_hostname, "END ")&lt;/LI-CODE&gt;&lt;P&gt;Note that this results in a different field compared to&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;solution - that form will give you a single value field with embedded newlines, whereas mvappend gives you a multi-value field with each line a separate value of the field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 01:21:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-a-field-value-of-single-line-to-displayed-as/m-p/593225#M206477</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-04-11T01:21:12Z</dc:date>
    </item>
  </channel>
</rss>

