<?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 How to create a search that provides option for a LIKE and not LIKE option in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-provides-option-for-a-LIKE-and-not/m-p/671487#M230110</link>
    <description>&lt;P&gt;Is there a way of creating a search where we can have both LIKE and NOT LIKE, based on user selected option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ie.&amp;nbsp;&lt;/P&gt;&lt;P&gt;if $user_option_tk$ == True:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | where NOT (error_string LIKE "%$filter_tk$%")&lt;/P&gt;&lt;P&gt;else:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | where&amp;nbsp;error_string LIKE "%$filter_tk$%"&lt;/P&gt;</description>
    <pubDate>Mon, 11 Dec 2023 22:18:35 GMT</pubDate>
    <dc:creator>GaryZ</dc:creator>
    <dc:date>2023-12-11T22:18:35Z</dc:date>
    <item>
      <title>How to create a search that provides option for a LIKE and not LIKE option</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-provides-option-for-a-LIKE-and-not/m-p/671487#M230110</link>
      <description>&lt;P&gt;Is there a way of creating a search where we can have both LIKE and NOT LIKE, based on user selected option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ie.&amp;nbsp;&lt;/P&gt;&lt;P&gt;if $user_option_tk$ == True:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | where NOT (error_string LIKE "%$filter_tk$%")&lt;/P&gt;&lt;P&gt;else:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | where&amp;nbsp;error_string LIKE "%$filter_tk$%"&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 22:18:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-provides-option-for-a-LIKE-and-not/m-p/671487#M230110</guid>
      <dc:creator>GaryZ</dc:creator>
      <dc:date>2023-12-11T22:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search that provides option for a LIKE and not LIKE option</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-provides-option-for-a-LIKE-and-not/m-p/671488#M230111</link>
      <description>&lt;P&gt;Use the filter token to classify your data (set a synthetic field to either 1 or 0 (or true/false, green/red or whatever you want) and then do a "where" command depending on the option token - match eithee the 0s or 1s of your synthetic field.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 22:31:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-that-provides-option-for-a-LIKE-and-not/m-p/671488#M230111</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-12-11T22:31:12Z</dc:date>
    </item>
  </channel>
</rss>

