<?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 Help for subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-for-subsearch/m-p/26637#M5162</link>
    <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;

&lt;P&gt;I need the result from first search in another search.&lt;/P&gt;

&lt;P&gt;First search:&lt;BR /&gt;
sourcetype=win_server | multikv fields ID Servername | search Servername=$INPUT$ | table ID | dedup ID&lt;/P&gt;

&lt;P&gt;--&amp;gt; gives me for exmaple ID 13 back&lt;/P&gt;

&lt;P&gt;At next I need this ID for figure out the location&lt;/P&gt;

&lt;P&gt;Secound search:&lt;/P&gt;

&lt;P&gt;sourcetype=win_server | multikv fields ID Location | search ID=$INPUT$ | table Location | dedup Location&lt;/P&gt;

&lt;P&gt;Can anyone help me to bring them together?&lt;/P&gt;

&lt;P&gt;Thanks a lot&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
    <pubDate>Fri, 13 Apr 2012 13:24:05 GMT</pubDate>
    <dc:creator>nebel</dc:creator>
    <dc:date>2012-04-13T13:24:05Z</dc:date>
    <item>
      <title>Help for subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-for-subsearch/m-p/26637#M5162</link>
      <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;

&lt;P&gt;I need the result from first search in another search.&lt;/P&gt;

&lt;P&gt;First search:&lt;BR /&gt;
sourcetype=win_server | multikv fields ID Servername | search Servername=$INPUT$ | table ID | dedup ID&lt;/P&gt;

&lt;P&gt;--&amp;gt; gives me for exmaple ID 13 back&lt;/P&gt;

&lt;P&gt;At next I need this ID for figure out the location&lt;/P&gt;

&lt;P&gt;Secound search:&lt;/P&gt;

&lt;P&gt;sourcetype=win_server | multikv fields ID Location | search ID=$INPUT$ | table Location | dedup Location&lt;/P&gt;

&lt;P&gt;Can anyone help me to bring them together?&lt;/P&gt;

&lt;P&gt;Thanks a lot&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2012 13:24:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-for-subsearch/m-p/26637#M5162</guid>
      <dc:creator>nebel</dc:creator>
      <dc:date>2012-04-13T13:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help for subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-for-subsearch/m-p/26638#M5163</link>
      <description>&lt;P&gt;I think you will need to use the subsearch (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/User/HowSubsearchesWork"&gt;docs&lt;/A&gt;) field, "search" (shown in the subsearch docs), you should then be able to modify your search to the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=win_server | multikv fields ID Location | search [search sourcetype=win_server | multikv fields ID Servername | search Servername=$INPUT$ | table ID | dedup ID | rename ID as search | fields + search] | table Location | dedup Location
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically this should be equivalent to you typing ".. | search ID=13 |.." if you were to search the data manually. (additionally... the "query" performs a more generic search, i.e. "... | search 13 | ...").&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;MHibbin&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2012 13:35:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-for-subsearch/m-p/26638#M5163</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2012-04-13T13:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help for subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-for-subsearch/m-p/26639#M5164</link>
      <description>&lt;P&gt;thanks a lot. Worked great!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2012 13:46:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-for-subsearch/m-p/26639#M5164</guid>
      <dc:creator>nebel</dc:creator>
      <dc:date>2012-04-13T13:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help for subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-for-subsearch/m-p/26640#M5165</link>
      <description>&lt;P&gt;nice one, have fun!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2012 13:49:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-for-subsearch/m-p/26640#M5165</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2012-04-13T13:49:25Z</dc:date>
    </item>
  </channel>
</rss>

