<?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 search a field for values that are stored in another field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257187#M77011</link>
    <description>&lt;P&gt;Try the &lt;CODE&gt;where&lt;/CODE&gt; command. Like this &lt;CODE&gt;.. | where fieldA=fieldB&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 18 May 2016 15:22:17 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-05-18T15:22:17Z</dc:date>
    <item>
      <title>How to search a field for values that are stored in another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257182#M77006</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you please help me with the following case? I'm trying to use the value of a field to search within the values of another field. The search is as follows and it does not work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = dummy | eval FieldA=case(...) | search FieldB=FieldA
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Output: it should return the rows whose FieldB equals FieldA. &lt;/P&gt;

&lt;P&gt;It doesn't seem difficult, but Splunk cannot handle that.&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 13:18:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257182#M77006</guid>
      <dc:creator>macoo</dc:creator>
      <dc:date>2016-05-18T13:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to search a field for values that are stored in another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257183#M77007</link>
      <description>&lt;P&gt;Your question title says subsearch and I don't see a subsearch in your example query. Could you provide the actual query that you're trying run (mask anything sensitive, just want to look at the eval of FieldA and usage of it in "subsearch")&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 14:25:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257183#M77007</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-18T14:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to search a field for values that are stored in another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257184#M77008</link>
      <description>&lt;P&gt;By the subsearch, I mean "| search FieldB = FieldA". A general problem is that I find it impossible to search a partiular field, e.g. FieldA for values that are stored in Field B. Do you see my point? &lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 14:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257184#M77008</guid>
      <dc:creator>macoo</dc:creator>
      <dc:date>2016-05-18T14:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to search a field for values that are stored in another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257185#M77009</link>
      <description>&lt;P&gt;Another example:&lt;/P&gt;

&lt;P&gt;index=veryBigIndex | eval valueContainer="dummyUser" | search UserList=valueContainer&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 14:33:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257185#M77009</guid>
      <dc:creator>macoo</dc:creator>
      <dc:date>2016-05-18T14:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to search a field for values that are stored in another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257186#M77010</link>
      <description>&lt;P&gt;So, find users that are called "dummyUser"&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 14:34:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257186#M77010</guid>
      <dc:creator>macoo</dc:creator>
      <dc:date>2016-05-18T14:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to search a field for values that are stored in another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257187#M77011</link>
      <description>&lt;P&gt;Try the &lt;CODE&gt;where&lt;/CODE&gt; command. Like this &lt;CODE&gt;.. | where fieldA=fieldB&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 15:22:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257187#M77011</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-05-18T15:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to search a field for values that are stored in another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257188#M77012</link>
      <description>&lt;P&gt;Hello Macoo,&lt;/P&gt;

&lt;P&gt;Were you able to arrive at a solution, i have a similar problem:&lt;/P&gt;

&lt;P&gt;Please first read case 2- it gives me the desired result but case 1 fails.&lt;BR /&gt;
my job number changes everyday but it remains unique for the same day, i am trying to automate the search so that same search is valid for second day and all other days.&lt;BR /&gt;
Basically i am looking for the completion status of Job number based on certain parameters that are defined in my search, please let me know for further inputs.&lt;/P&gt;

&lt;P&gt;Flow goes like : searching whole data--&amp;gt;extracting job number--&amp;gt;searching for my required data--&amp;gt;storing the desired job_number into my own variable using eval--&amp;gt;appending a new search which will append the whole event again, then further used pipe to search for my specific data.&lt;/P&gt;

&lt;P&gt;Case 1 - &lt;CODE&gt;index="ncenter" sourcetype="agent" | rex field=_raw "\.(?\d\d\d\d\d\d\d)\."|search BSC=DMS_01_UNZIP_RENAME AND ktg|dedup Job_Number|eval ktg_job=Job_Number|&lt;BR /&gt;
append[search index="ncenter" sourcetype="agent"]|search ktg_job=* AND completed&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Case 2- &lt;CODE&gt;index="ncenter" sourcetype="agent" | rex field=_raw "\.(?\d\d\d\d\d\d\d)\."|search BSC=DMS_01_UNZIP_RENAME AND ktg|dedup Job_Number|&lt;BR /&gt;
append[search index="ncenter" sourcetype="agent"]|search manually_putting_my_job_number AND completed&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 11:14:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-a-field-for-values-that-are-stored-in-another/m-p/257188#M77012</guid>
      <dc:creator>Akumar294</dc:creator>
      <dc:date>2018-09-27T11:14:47Z</dc:date>
    </item>
  </channel>
</rss>

