<?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: Multiple case statement conditions? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Multiple-case-statement-conditions/m-p/680711#M15791</link>
    <description>&lt;P&gt;If a &lt;FONT face="courier new,courier"&gt;case&lt;/FONT&gt; function returns no value it's because none of the expressions matched.&amp;nbsp; Adding a default expression&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval foo = case(..., 1==1, "???")&lt;/LI-CODE&gt;&lt;P&gt;will help flag edge cases that don't match the other expressions.&lt;/P&gt;&lt;P&gt;In this instance, it seems the first expression needs some wildcards unless you're looking for an exact match.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Status=case(like('message',"%Exchange Rates Process Completed. File sucessfully sent to Concur%"),"SUCCESS",
                  like('TracePoint',"%EXCEPTION%"),"ERROR")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2024 15:18:09 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2024-03-14T15:18:09Z</dc:date>
    <item>
      <title>Multiple case statement conditions?</title>
      <link>https://community.splunk.com/t5/Alerting/Multiple-case-statement-conditions/m-p/680705#M15789</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;In this case statement i am getting jobType values but i am not getting Status value. I already mentioned the keyword above in the query But why i am not getting .&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="mulesoft" applicationName="s-concur-api" environment=DEV  timestamp ("onDemand Flow for concur Expense Report file with FileID Started" OR "Exchange Rates Scheduler process started" OR "Exchange Rates Process Completed. File successfully sent to Concur")|transaction correlationId| rename timestamp as Timestamp correlationId as CorrelationId tracePoint as TracePoint content.payload.TargetFileName as TargetFileName
| eval JobType=case(like('message',"%onDemand Flow for concur Expense Report file with FileID Started%"),"OnDemand",like('message',"%Exchange Rates Scheduler process started%"),"Scheduled", true() , "Unknown")| eval Status=case(like('message',"Exchange Rates Process Completed. File sucessfully sent to Concur"),"SUCCESS",like('TracePoint',"%EXCEPTION%"),"ERROR") |table JobType Status&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 14:35:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Multiple-case-statement-conditions/m-p/680705#M15789</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-03-14T14:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple case statement conditions?</title>
      <link>https://community.splunk.com/t5/Alerting/Multiple-case-statement-conditions/m-p/680710#M15790</link>
      <description>&lt;P&gt;Without some sample events, it is difficult to determine what might be wrong with your search. Having said that, I noticed that the first option in your case function for Status does not have any wildcards in the pattern for the like function. Could this be the issue?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 15:08:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Multiple-case-statement-conditions/m-p/680710#M15790</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-03-14T15:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple case statement conditions?</title>
      <link>https://community.splunk.com/t5/Alerting/Multiple-case-statement-conditions/m-p/680711#M15791</link>
      <description>&lt;P&gt;If a &lt;FONT face="courier new,courier"&gt;case&lt;/FONT&gt; function returns no value it's because none of the expressions matched.&amp;nbsp; Adding a default expression&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval foo = case(..., 1==1, "???")&lt;/LI-CODE&gt;&lt;P&gt;will help flag edge cases that don't match the other expressions.&lt;/P&gt;&lt;P&gt;In this instance, it seems the first expression needs some wildcards unless you're looking for an exact match.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Status=case(like('message',"%Exchange Rates Process Completed. File sucessfully sent to Concur%"),"SUCCESS",
                  like('TracePoint',"%EXCEPTION%"),"ERROR")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 15:18:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Multiple-case-statement-conditions/m-p/680711#M15791</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-03-14T15:18:09Z</dc:date>
    </item>
  </channel>
</rss>

