<?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 Put fields results under other fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Put-fields-results-under-other-fields/m-p/300942#M90636</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have my query that return a table with 4 fields: A1, B1, A2, A2. I want to create a new table that contains 2 fields: A and B.&lt;/P&gt;

&lt;P&gt;example:&lt;BR /&gt;
current table - &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/4423iD956042DD9F57F47/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;desired table - &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/4424i9AE9D0CB342114EA/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;I would like to achieve that without running on the events again and append the results.&lt;/P&gt;

&lt;P&gt;is there an efficient way to do that?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2018 09:03:51 GMT</pubDate>
    <dc:creator>matansocher</dc:creator>
    <dc:date>2018-02-21T09:03:51Z</dc:date>
    <item>
      <title>Put fields results under other fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Put-fields-results-under-other-fields/m-p/300942#M90636</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have my query that return a table with 4 fields: A1, B1, A2, A2. I want to create a new table that contains 2 fields: A and B.&lt;/P&gt;

&lt;P&gt;example:&lt;BR /&gt;
current table - &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/4423iD956042DD9F57F47/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;desired table - &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/4424i9AE9D0CB342114EA/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;I would like to achieve that without running on the events again and append the results.&lt;/P&gt;

&lt;P&gt;is there an efficient way to do that?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 09:03:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Put-fields-results-under-other-fields/m-p/300942#M90636</guid>
      <dc:creator>matansocher</dc:creator>
      <dc:date>2018-02-21T09:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Put fields results under other fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Put-fields-results-under-other-fields/m-p/300943#M90637</link>
      <description>&lt;P&gt;hey try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval A1="1",B1="2",A2="3",B2="4" 
| append 
    [| makeresults 
    | eval A1="5",B1="6",A2="7",B2="8"] 
| append 
    [| makeresults 
    | eval A1="9",B1="10",A2="10",B2="11"] 
| eval A=A1+":"+B1,B=A2+":"+B2 
| table A B 
| eval C=mvzip(A,B) 
| makemv delim="," C 
| mvexpand C 
| rex field=C "(?&amp;lt;A&amp;gt;[^\:]+)\:(?&amp;lt;B&amp;gt;.*)" 
| table A B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your environment, you should try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;table with columns A1,A2,B1,B2&amp;gt; 
| eval A=A1+":"+B1,B=A2+":"+B2 
| table A B 
| eval C=mvzip(A,B) 
| makemv delim="," C 
| mvexpand C 
| rex field=C "(?&amp;lt;A&amp;gt;[^\:]+)\:(?&amp;lt;B&amp;gt;.*)" 
| table A B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 09:53:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Put-fields-results-under-other-fields/m-p/300943#M90637</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-02-21T09:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Put fields results under other fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Put-fields-results-under-other-fields/m-p/300944#M90638</link>
      <description>&lt;P&gt;great workaround! thanks&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 09:58:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Put-fields-results-under-other-fields/m-p/300944#M90638</guid>
      <dc:creator>matansocher</dc:creator>
      <dc:date>2018-02-21T09:58:13Z</dc:date>
    </item>
  </channel>
</rss>

