<?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 do i combine multiple fields in to a single field?? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86795#M22150</link>
    <description>&lt;P&gt;Linu1988 has the right idea.  Try that and let us know how it works.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2013 12:56:03 GMT</pubDate>
    <dc:creator>okrabbe_splunk</dc:creator>
    <dc:date>2013-07-08T12:56:03Z</dc:date>
    <item>
      <title>how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86789#M22144</link>
      <description>&lt;P&gt;hi..&lt;/P&gt;

&lt;P&gt;I have four fields say A,B,C,D..All these are multivalued fields .. i.e for a single event they can be multiple values in these fields..how can i join them in to a single field ??&lt;/P&gt;

&lt;P&gt;used eval MyFiled=(A+B+C+D) like this .. but this is not working...can any one pls help&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jul 2013 18:32:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86789#M22144</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-07-07T18:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86790#M22145</link>
      <description>&lt;P&gt;If you are trying to join multi value fields together you should look into using mvzip.  You would have to call it multiple times because mvzip only works on two fields at a time.&lt;/P&gt;

&lt;P&gt;The description of eval functions is located here:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jul 2013 20:34:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86790#M22145</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2013-07-07T20:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86791#M22146</link>
      <description>&lt;P&gt;yeah..thanks orkrabbe_splunk even i found this..but since mvzip has only two fields..i thought ther could be something else to figure this..:)&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 07:12:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86791#M22146</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-07-08T07:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86792#M22147</link>
      <description>&lt;P&gt;small issue here..say i am getting one event. and in that single event i dnt have values for A and have mutliple values for B. in this case i used fillnull to fill the value of "A" as "NA". Since i am getting one event as ouput. A is having only one value "N/A" where as B field having multiple fields... so in this case when i use mvzip(A,B) ..its is only showing me one value . &lt;/P&gt;

&lt;P&gt;say for single event output . B has values 1 ,2 , 3, 4 as multiple values.. A has no data to extract ..so used to fillnull to fill A as "N/A" .. now A is having the value ="N/A"&lt;/P&gt;

&lt;P&gt;now mvzip(A,B) is resulting as N/A,1&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 08:29:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86792#M22147</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-07-08T08:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86793#M22148</link>
      <description>&lt;P&gt;[cont..]&lt;/P&gt;

&lt;P&gt;and it is missing all the other values of B i.e 2,3 and 4. Can you please tell a way in which i can fillnull all the values of A to be "N/A" . if there is no data to extract for A. thanks&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 08:31:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86793#M22148</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-07-08T08:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86794#M22149</link>
      <description>&lt;P&gt;Could you try table A,B then mvexpand B? Then try with mvzip.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 10:15:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86794#M22149</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-07-08T10:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86795#M22150</link>
      <description>&lt;P&gt;Linu1988 has the right idea.  Try that and let us know how it works.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 12:56:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86795#M22150</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2013-07-08T12:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86796#M22151</link>
      <description>&lt;P&gt;Hi Linu1988..i tried that.but it didnt wrk &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2013 17:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86796#M22151</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-07-10T17:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86797#M22152</link>
      <description>&lt;P&gt;Rakesh,  could you share maybe a sample of your data and the search string you are using now?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2013 17:36:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86797#M22152</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2013-07-10T17:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86798#M22153</link>
      <description>&lt;P&gt;My suggestion would be to use &lt;STRONG&gt;mvappend&lt;/STRONG&gt; and &lt;STRONG&gt;mvjoin&lt;/STRONG&gt; to create the fields you need.  Perhaps something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...your search | fillnull value="N/A" A 
               | eval TempField=mvappend(B, " ", C) 
               | eval TempField=mvappend(TempField, " ", D) 
               | eval TempField=mvappend(A, " ", TempField)
               | eval FinalField=mvjoin(TempField, " ")
               | ...rest of your commands
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then use whatever you set for &lt;STRONG&gt;FinalField&lt;/STRONG&gt; in your reports, and just ignore &lt;STRONG&gt;TempField&lt;/STRONG&gt;.  It's a bit roundabout, but I think it will do the trick.  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;  &lt;EM&gt;I can't post comments to answers from my workplace for some reason, so I'll have to respond to any by editing the original post.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2013 19:32:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86798#M22153</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2013-07-10T19:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86799#M22154</link>
      <description>&lt;P&gt;Hi Rakesh, Did you get the answer for this. I am facing the same issue. please let me know. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2014 19:05:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86799#M22154</guid>
      <dc:creator>srinathd</dc:creator>
      <dc:date>2014-11-11T19:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: how do i combine multiple fields in to a single field??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86800#M22155</link>
      <description>&lt;P&gt;@rakesh_498115&lt;/P&gt;

&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval A="A,B,C",B="D,E,F",C="G,H,I",D="X,Y,Z",E=nulll 
| foreach * 
    [ eval "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"=split(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;,",") ] 
| eval multivalued_field=mvappend(A,B,C,D),singlevalued_field=mvjoin(multivalued_field,",")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Sep 2018 15:20:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-do-i-combine-multiple-fields-in-to-a-single-field/m-p/86800#M22155</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-09-23T15:20:32Z</dc:date>
    </item>
  </channel>
</rss>

