<?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 assign an extracted field from a subsearch to be the source in an outer search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233104#M69199</link>
    <description>&lt;P&gt;Thank you very much for showing me the correct path. The only change I did is I added fields + A and then renamed A as source as suggested by you and it worked magically . Thank you very very much.&lt;/P&gt;</description>
    <pubDate>Sun, 20 Nov 2016 07:04:51 GMT</pubDate>
    <dc:creator>pmaitra</dc:creator>
    <dc:date>2016-11-20T07:04:51Z</dc:date>
    <item>
      <title>How do I assign an extracted field from a subsearch to be the source in an outer search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233100#M69195</link>
      <description>&lt;P&gt;I have a search from which I extracted field A. In the second search, how do I assign A to be the source of the second search? &lt;/P&gt;

&lt;P&gt;For example :&lt;BR /&gt;
I am using the below query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=something  host=somevalue source=something/something/something/something/A    B  [search eventtype=somevalue | table A | dedup A | fields + A] | table B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From the above query what I am expecting is :&lt;/P&gt;

&lt;P&gt;My subsearch will return field A.&lt;BR /&gt;
My outer search will use field A as a source in which I will get result B .&lt;/P&gt;

&lt;P&gt;Please help me out with this.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 19:48:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233100#M69195</guid>
      <dc:creator>pmaitra</dc:creator>
      <dc:date>2016-11-18T19:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign an extracted field from a subsearch to be the source in an outer search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233101#M69196</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;P&gt;*&lt;STRONG&gt;&lt;EM&gt;UPDATED&lt;/EM&gt;&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=something  host=somevalue  [search eventtype=somevalue | table A | dedup A | eval A="x/x/x/x/".A | rename A as source ] | table B
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Nov 2016 20:23:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233101#M69196</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-18T20:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign an extracted field from a subsearch to be the source in an outer search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233102#M69197</link>
      <description>&lt;P&gt;If you want to search the values stored in field &lt;CODE&gt;A&lt;/CODE&gt; from internal search as strings in your outer search and then tabulate the field &lt;CODE&gt;B&lt;/CODE&gt; in outer search then give this a try please (Notice I have removed plain &lt;CODE&gt;B&lt;/CODE&gt; from this search in outer search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=something host=something source=x/x/x/A  
[search index=something host=something source=y/y/y/y | table A | dedup A | return 10000 $A ] 
| table B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here both &lt;CODE&gt;A&lt;/CODE&gt; and &lt;CODE&gt;B&lt;/CODE&gt; are field names. In your comment's example, searching for a field &lt;CODE&gt;B&lt;/CODE&gt; just by placing the field name &lt;CODE&gt;B&lt;/CODE&gt; in outer search won't help which I quote below: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=something host=something source = x/x/x/A&lt;/CODE&gt; &lt;CODE&gt;B&lt;/CODE&gt; &lt;CODE&gt;[search index=something host=something source=y/y/y/y | table A | dedup A | fields + A ] | table B&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;It should be &lt;CODE&gt;B=something&lt;/CODE&gt; in the outer search of your comment.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Nov 2016 06:15:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233102#M69197</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-11-19T06:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign an extracted field from a subsearch to be the source in an outer search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233103#M69198</link>
      <description>&lt;P&gt;Hey Sundareshr thanks!&lt;/P&gt;

&lt;P&gt;I used your updated query and got exactly what I want the source to be in my outer query. But unfortunately it is still resulting in 0 events. Please help if you have any other way out!&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2016 04:14:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233103#M69198</guid>
      <dc:creator>pmaitra</dc:creator>
      <dc:date>2016-11-20T04:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign an extracted field from a subsearch to be the source in an outer search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233104#M69199</link>
      <description>&lt;P&gt;Thank you very much for showing me the correct path. The only change I did is I added fields + A and then renamed A as source as suggested by you and it worked magically . Thank you very very much.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2016 07:04:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233104#M69199</guid>
      <dc:creator>pmaitra</dc:creator>
      <dc:date>2016-11-20T07:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign an extracted field from a subsearch to be the source in an outer search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233105#M69200</link>
      <description>&lt;P&gt;Do you expect single value for field A or multiple?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2016 10:52:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-an-extracted-field-from-a-subsearch-to-be-the/m-p/233105#M69200</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2016-11-20T10:52:23Z</dc:date>
    </item>
  </channel>
</rss>

