<?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 Condition value NOT equal to....whatever in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Condition-value-NOT-equal-to-whatever/m-p/324295#M96787</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have this XML code.  What I'm trying to do is when the &lt;CODE&gt;value = *&lt;/CODE&gt;, run a separate query and when the value is anything else but &lt;CODE&gt;*&lt;/CODE&gt; run a different query.  I'm having difficulty figuring out how to configure condition value to be not equal to &lt;CODE&gt;*&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;input type="dropdown" token="mso_selection" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select a MSO&amp;lt;/label&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index=wholesale_app  sourcetype=wholesale_mobile_app buildTarget | dedup buildTarget&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;-1d&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;buildTarget&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;buildTarget&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;choice value="*"&amp;gt;- All -&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;

      &amp;lt;change&amp;gt;
         &amp;lt;condition value="*"&amp;gt;
           &amp;lt;set token="tokSearchQueryPanel1"&amp;gt;index=mso_statistics sourcetype=ic_connectivity_5min-too_small  stat_name=subscribers |rex "\d+\s(?&amp;lt;mso&amp;gt;\w+)"|stats max(stat_val) as Subscribers by mso|stats sum(Subscribers) as count&amp;lt;/set&amp;gt;
           &amp;lt;unset token="tokSearchQueryPanel2"&amp;gt;&amp;lt;/unset&amp;gt;
         &amp;lt;/condition&amp;gt;

         &amp;lt;condition value"*"&amp;gt;     (this line is what I'm trying to figure out)

           &amp;lt;set token="tokSearchQueryPanel2"&amp;gt;index=mso_statistics sourcetype=ic_connectivity_5min-too_small  stat_name=subscribers |rex "\d+\s(?&amp;amp;lt;mso&amp;amp;gt;\w+)"|stats max(stat_val) as Subscribers by mso|where like(mso,"%$mso_selection$%") |stats sum(Subscribers) as count&amp;lt;/set&amp;gt;
           &amp;lt;unset token="tokSearchQueryPanel1"&amp;gt;&amp;lt;/unset&amp;gt;
         &amp;lt;/condition&amp;gt;
       &amp;lt;/change&amp;gt;

    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 07 Dec 2017 17:30:36 GMT</pubDate>
    <dc:creator>dbcase</dc:creator>
    <dc:date>2017-12-07T17:30:36Z</dc:date>
    <item>
      <title>Condition value NOT equal to....whatever</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Condition-value-NOT-equal-to-whatever/m-p/324295#M96787</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have this XML code.  What I'm trying to do is when the &lt;CODE&gt;value = *&lt;/CODE&gt;, run a separate query and when the value is anything else but &lt;CODE&gt;*&lt;/CODE&gt; run a different query.  I'm having difficulty figuring out how to configure condition value to be not equal to &lt;CODE&gt;*&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;input type="dropdown" token="mso_selection" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select a MSO&amp;lt;/label&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index=wholesale_app  sourcetype=wholesale_mobile_app buildTarget | dedup buildTarget&amp;lt;/query&amp;gt;
        &amp;lt;earliest&amp;gt;-1d&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;buildTarget&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;buildTarget&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;choice value="*"&amp;gt;- All -&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;initialValue&amp;gt;*&amp;lt;/initialValue&amp;gt;

      &amp;lt;change&amp;gt;
         &amp;lt;condition value="*"&amp;gt;
           &amp;lt;set token="tokSearchQueryPanel1"&amp;gt;index=mso_statistics sourcetype=ic_connectivity_5min-too_small  stat_name=subscribers |rex "\d+\s(?&amp;lt;mso&amp;gt;\w+)"|stats max(stat_val) as Subscribers by mso|stats sum(Subscribers) as count&amp;lt;/set&amp;gt;
           &amp;lt;unset token="tokSearchQueryPanel2"&amp;gt;&amp;lt;/unset&amp;gt;
         &amp;lt;/condition&amp;gt;

         &amp;lt;condition value"*"&amp;gt;     (this line is what I'm trying to figure out)

           &amp;lt;set token="tokSearchQueryPanel2"&amp;gt;index=mso_statistics sourcetype=ic_connectivity_5min-too_small  stat_name=subscribers |rex "\d+\s(?&amp;amp;lt;mso&amp;amp;gt;\w+)"|stats max(stat_val) as Subscribers by mso|where like(mso,"%$mso_selection$%") |stats sum(Subscribers) as count&amp;lt;/set&amp;gt;
           &amp;lt;unset token="tokSearchQueryPanel1"&amp;gt;&amp;lt;/unset&amp;gt;
         &amp;lt;/condition&amp;gt;
       &amp;lt;/change&amp;gt;

    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Dec 2017 17:30:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Condition-value-NOT-equal-to-whatever/m-p/324295#M96787</guid>
      <dc:creator>dbcase</dc:creator>
      <dc:date>2017-12-07T17:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Condition value NOT equal to....whatever</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Condition-value-NOT-equal-to-whatever/m-p/324296#M96788</link>
      <description>&lt;P&gt;@dbcase, you can just use a condition block without any match expression. This servers as else condition.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;condition value="*"&amp;gt;
             &amp;lt;-- Your Code For Value Matching Asterix --&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition&amp;gt;
             &amp;lt;--  Your Code For All Other Values not matching Asterix --&amp;gt;
      &amp;lt;/condition&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Refer to one of my comments in my previous answer on similar question: &lt;A href="https://answers.splunk.com/answers/596673/how-can-i-get-the-value-of-a-token-as-a-search-eva.html"&gt;https://answers.splunk.com/answers/596673/how-can-i-get-the-value-of-a-token-as-a-search-eva.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 17:50:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Condition-value-NOT-equal-to-whatever/m-p/324296#M96788</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-07T17:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Condition value NOT equal to....whatever</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Condition-value-NOT-equal-to-whatever/m-p/324297#M96789</link>
      <description>&lt;P&gt;Condition on &lt;CODE&gt;label="All"&lt;/CODE&gt; instead.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 17:58:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Condition-value-NOT-equal-to-whatever/m-p/324297#M96789</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-12-07T17:58:19Z</dc:date>
    </item>
  </channel>
</rss>

