<?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: wrong results for case statement with AND in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/wrong-results-for-case-statement-with-AND/m-p/570906#M198952</link>
    <description>&lt;P&gt;Check the type of the fields.&amp;nbsp;&lt;BR /&gt;e.g.&amp;nbsp; | eval type_of_field = typeof(block_public_acls)&lt;BR /&gt;&lt;BR /&gt;If it is "String", then you can wrap the right side of the condition with quotation marks.&lt;BR /&gt;&lt;BR /&gt;| eval perm=case(block_public_acls="true" AND block_public_policy="true" AND ignore_public_acls="true" AND restrict_public_buckets="true","Private",1=1,"Public")&lt;/P&gt;</description>
    <pubDate>Thu, 14 Oct 2021 08:04:32 GMT</pubDate>
    <dc:creator>marilyncugal</dc:creator>
    <dc:date>2021-10-14T08:04:32Z</dc:date>
    <item>
      <title>wrong results for case statement with AND</title>
      <link>https://community.splunk.com/t5/Splunk-Search/wrong-results-for-case-statement-with-AND/m-p/570902#M198949</link>
      <description>&lt;P&gt;I used this eval statement with AND conditions but I'm only getting result as "Public" even when the condition satisfies for value "Private" i.e. I'm only getting default result. Any idea of what's wrong with this statement?&lt;/P&gt;&lt;P&gt;| eval perm=case(block_public_acls=true AND block_public_policy=true AND ignore_public_acls=true AND restrict_public_buckets=true,"Private",1=1,"Public")&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sam1010_1-1634196686147.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16417i6C9370278BAFCF01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sam1010_1-1634196686147.png" alt="sam1010_1-1634196686147.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 07:32:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/wrong-results-for-case-statement-with-AND/m-p/570902#M198949</guid>
      <dc:creator>sam1010</dc:creator>
      <dc:date>2021-10-14T07:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: wrong results for case statement with AND</title>
      <link>https://community.splunk.com/t5/Splunk-Search/wrong-results-for-case-statement-with-AND/m-p/570904#M198950</link>
      <description>&lt;P&gt;Have you tried putting "true" in double quotes?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 07:43:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/wrong-results-for-case-statement-with-AND/m-p/570904#M198950</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-10-14T07:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: wrong results for case statement with AND</title>
      <link>https://community.splunk.com/t5/Splunk-Search/wrong-results-for-case-statement-with-AND/m-p/570905#M198951</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234869"&gt;@sam1010&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;use double quotes in all the conditions:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval perm=case(block_public_acls="true" AND block_public_policy="true" AND ignore_public_acls="true" AND restrict_public_buckets="true","Private",1=1,"Public")
&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 07:43:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/wrong-results-for-case-statement-with-AND/m-p/570905#M198951</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-10-14T07:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: wrong results for case statement with AND</title>
      <link>https://community.splunk.com/t5/Splunk-Search/wrong-results-for-case-statement-with-AND/m-p/570906#M198952</link>
      <description>&lt;P&gt;Check the type of the fields.&amp;nbsp;&lt;BR /&gt;e.g.&amp;nbsp; | eval type_of_field = typeof(block_public_acls)&lt;BR /&gt;&lt;BR /&gt;If it is "String", then you can wrap the right side of the condition with quotation marks.&lt;BR /&gt;&lt;BR /&gt;| eval perm=case(block_public_acls="true" AND block_public_policy="true" AND ignore_public_acls="true" AND restrict_public_buckets="true","Private",1=1,"Public")&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 08:04:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/wrong-results-for-case-statement-with-AND/m-p/570906#M198952</guid>
      <dc:creator>marilyncugal</dc:creator>
      <dc:date>2021-10-14T08:04:32Z</dc:date>
    </item>
  </channel>
</rss>

