<?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 extract a field value to use as a search term for filtering? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272834#M82161</link>
    <description>&lt;P&gt;How are you populating the field which contains the search condition? &lt;BR /&gt;
It wouldn't have helped if it was part of raw data, but if you're using a lookup OR something get that, there might be a way.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2016 17:24:50 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-12-14T17:24:50Z</dc:date>
    <item>
      <title>How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272825#M82152</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I need a way to extract/convert a field value to a search condition.  &lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;field_value= "src_ip=192.168.1.1 AND user=Disco" &lt;BR /&gt;
Search: mysearch NOT 'field_value'  ---&amp;gt; which should translate to ---&amp;gt; mysearch NOT  (src_ip=192.168.1.1 AND user=Disco)&lt;/P&gt;

&lt;P&gt;I know the single quotes don't work. I am wondering if there is any function that helps.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:04:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272825#M82152</guid>
      <dc:creator>pewaubek_reid</dc:creator>
      <dc:date>2020-09-29T12:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272826#M82153</link>
      <description>&lt;P&gt;Is the values of "field_value" always similar, means your search condition is always on same fields src_ip and user?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:07:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272826#M82153</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T12:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272827#M82154</link>
      <description>&lt;P&gt;No.  It would be dynamic and could be any combination of field=values.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 22:33:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272827#M82154</guid>
      <dc:creator>pewaubek_reid</dc:creator>
      <dc:date>2016-12-13T22:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272828#M82155</link>
      <description>&lt;P&gt;yoursearch | eval field_value="some value or and expression" | where another_field != $field_value$&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:04:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272828#M82155</guid>
      <dc:creator>nabeel652</dc:creator>
      <dc:date>2020-09-29T12:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272829#M82156</link>
      <description>&lt;P&gt;The problem with this is that it is still comparing fields and their respective values.  The value(s) of 'field_value' can be any combination of field=value and would be dynamic, therefore defining a new field_value using eval wouldn't be efficient as I'd have to account for every possible field=value combination.  I think the optimal situation here is to be able to "break out" 'field_value' and insert it into the search string.  I would imagine a token + subsearch would work but I can't find a way to use a token inline in a search.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:05:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272829#M82156</guid>
      <dc:creator>pewaubek_reid</dc:creator>
      <dc:date>2020-09-29T12:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272830#M82157</link>
      <description>&lt;P&gt;I may have a workaround if the condition is always in format "field1=value1 AND field2=value2....". Is that the case (all conditions are conjoined by 'AND')?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 16:23:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272830#M82157</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-14T16:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272831#M82158</link>
      <description>&lt;P&gt;The condition can be in any combination of field=value so just "field1=value1" or "field1=value1 AND field2=value2 OR field3=value3"...  The fields and values would exist independently in the base search, but not the new field containing the field=value pairs/combinations.  That's why I'm trying to find a way to change the field=value pairs/combinations from a field value into a search condition/string.  Thanks for your attention, any ideas are welcome.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 16:40:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272831#M82158</guid>
      <dc:creator>pewaubek_reid</dc:creator>
      <dc:date>2016-12-14T16:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272832#M82159</link>
      <description>&lt;P&gt;The field which contains the search condition is available in the raw data of base search(es) itself?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 17:06:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272832#M82159</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-14T17:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272833#M82160</link>
      <description>&lt;P&gt;Nope, the new field which I am populating with the dynamic field=value combinations doesn't exist in the raw data.  The individual fields &amp;amp; values would exist which is why I need to insert them into the search query.  I don't think that would matter anyway as I'm not trying to match field values, I'm trying to insert field=values combinations into search string.  &lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 17:16:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272833#M82160</guid>
      <dc:creator>pewaubek_reid</dc:creator>
      <dc:date>2016-12-14T17:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272834#M82161</link>
      <description>&lt;P&gt;How are you populating the field which contains the search condition? &lt;BR /&gt;
It wouldn't have helped if it was part of raw data, but if you're using a lookup OR something get that, there might be a way.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 17:24:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272834#M82161</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-14T17:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272835#M82162</link>
      <description>&lt;P&gt;Gotcha.  I am using a lookup.  The field_value will be dynamically populated with various field=value combinations.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 17:31:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272835#M82162</guid>
      <dc:creator>pewaubek_reid</dc:creator>
      <dc:date>2016-12-14T17:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272836#M82163</link>
      <description>&lt;P&gt;Would you mind providing your search, which includes the lookup command?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 19:31:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272836#M82163</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-14T19:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272837#M82164</link>
      <description>&lt;P&gt;I have a search that doesn't work.  Open to ideas...&lt;/P&gt;

&lt;P&gt;some_events some_sourcetype NOT [|inputlookup some_lookup.csv]&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:07:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272837#M82164</guid>
      <dc:creator>pewaubek_reid</dc:creator>
      <dc:date>2020-09-29T12:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272838#M82165</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;some_events some_sourcetype NOT [|inputlookup some_lookup.csv | eval search=field_that_contains_conditions | table search ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Dec 2016 21:24:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272838#M82165</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-14T21:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field value to use as a search term for filtering?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272839#M82166</link>
      <description>&lt;P&gt;I received an email alert for another comment here but it isn't showing up.  Here it is quoted;&lt;/P&gt;

&lt;P&gt;"Try something like this&lt;/P&gt;

&lt;P&gt;some_events some_sourcetype NOT [|inputlookup some_lookup.csv | eval search=field_that_contains_conditions | table search ]"&lt;/P&gt;

&lt;P&gt;I believe this is just renaming my field in the lookup table to 'search' not actually creating search conditions from the field value.  I couldn't find an eval function called "search".&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-value-to-use-as-a-search-term-for/m-p/272839#M82166</guid>
      <dc:creator>pewaubek_reid</dc:creator>
      <dc:date>2020-09-29T12:08:00Z</dc:date>
    </item>
  </channel>
</rss>

