<?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: My case statement works until I add an AND to it in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510684#M142957</link>
    <description>&lt;P&gt;Can you print dest and X etc. if those are fields and not values?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jul 2020 15:35:05 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2020-07-23T15:35:05Z</dc:date>
    <item>
      <title>Why does the case statement works until an AND is added to it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510539#M142888</link>
      <description>&lt;P&gt;When I have this case statement like this, it "works". It runs and puts values in the iSeries column, but they are wrong.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval Platform=case((source="A" OR source="B" OR source="C") , "iSeries", true(),"Other")&lt;/LI-CODE&gt;
&lt;P&gt;When I add an AND to it so that it fulfills the true condition, no values are put in the iSeries column, and everything goes to Other.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval Platform=case((source="A" OR source="B" OR source="C") AND (dest=X OR dest=Y OR dest=Z), "iSeries", true(),"Other")&lt;/LI-CODE&gt;
&lt;P&gt;What am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 04:27:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510539#M142888</guid>
      <dc:creator>azvargas</dc:creator>
      <dc:date>2020-07-23T04:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: My case statement works until I add an AND to it</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510543#M142889</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Is your dest X or "X"?&lt;/P&gt;&lt;LI-CODE lang="java"&gt;| makeresults
| eval source="A", dest="X"
| eval Platform=case((source="A" OR source="B" OR source="C") AND (dest="X" OR dest="Y" OR dest="Z"), "iSeries", true(),"Other")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 21:16:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510543#M142889</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-07-22T21:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: My case statement works until I add an AND to it</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510545#M142890</link>
      <description>&lt;P&gt;In eval statement,&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;dest=x &lt;/STRONG&gt;means the field &lt;STRONG&gt;dest &lt;/STRONG&gt;equals the field&lt;STRONG&gt; x.&lt;BR /&gt;&lt;/STRONG&gt;As&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp;says, you need quotes.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 21:38:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510545#M142890</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-22T21:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: My case statement works until I add an AND to it</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510636#M142944</link>
      <description>&lt;P&gt;I've tried with and without quotes, and it still doesnt work.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 12:07:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510636#M142944</guid>
      <dc:creator>azvargas</dc:creator>
      <dc:date>2020-07-23T12:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: My case statement works until I add an AND to it</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510646#M142950</link>
      <description>&lt;P&gt;&amp;gt;&lt;SPAN&gt;It runs and puts values in the iSeries column.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;your working query puts&amp;nbsp;&lt;STRONG&gt;"iSeries"&lt;/STRONG&gt; text on &lt;STRONG&gt;Platform&lt;/STRONG&gt; field(column).&lt;BR /&gt;&lt;BR /&gt;&amp;gt;it still doesnt work.&lt;BR /&gt;what's your expected result?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 12:47:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510646#M142950</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-23T12:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: My case statement works until I add an AND to it</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510665#M142954</link>
      <description>&lt;P&gt;Correct, my query puts "iSeries" text in the Platform field.&amp;nbsp; But it only works without the AND clause, but this is not the right condition.&amp;nbsp; I need it to work with the AND clause portion.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 13:47:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510665#M142954</guid>
      <dc:creator>azvargas</dc:creator>
      <dc:date>2020-07-23T13:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: My case statement works until I add an AND to it</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510684#M142957</link>
      <description>&lt;P&gt;Can you print dest and X etc. if those are fields and not values?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 15:35:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510684#M142957</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-07-23T15:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: My case statement works until I add an AND to it</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510709#M142961</link>
      <description>&lt;P&gt;I'd like to add that I have had this same criteria for close to a year in a dashboard just not in a case statement and it works.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 18:05:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/510709#M142961</guid>
      <dc:creator>azvargas</dc:creator>
      <dc:date>2020-07-23T18:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: My case statement works until I add an AND to it</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/511207#M143198</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;Can you print dest and X etc. if those are fields and not values?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Not sure how to do this.&amp;nbsp; Its a long query.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 19:05:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/511207#M143198</guid>
      <dc:creator>azvargas</dc:creator>
      <dc:date>2020-07-27T19:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: My case statement works until I add an AND to it</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/511208#M143199</link>
      <description>&lt;P&gt;e.g.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;| makeresults
| eval foo="A", bar=foo
| eval foobar= "'" . foo . "' '" . bar . "'"
| table foo bar foobar&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 27 Jul 2020 19:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-case-statement-works-until-an-AND-is-added-to-it/m-p/511208#M143199</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-07-27T19:12:15Z</dc:date>
    </item>
  </channel>
</rss>

