<?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: eval if clarification in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/eval-if-clarification/m-p/237986#M176131</link>
    <description>&lt;P&gt;Yes you can do that similar to my example below:&lt;/P&gt;

&lt;P&gt;In my example below, &lt;CODE&gt;abc&lt;/CODE&gt; is the new variable I create. &lt;CODE&gt;processState&lt;/CODE&gt; is another variable which will have &lt;CODE&gt;active&lt;/CODE&gt; or &lt;CODE&gt;ft&lt;/CODE&gt;, on which I am checking for status. Based on &lt;CODE&gt;active&lt;/CODE&gt; status, I use another variable &lt;CODE&gt;cpuUsage&lt;/CODE&gt; which will have more than one kind of value and get assigned to &lt;CODE&gt;abc&lt;/CODE&gt;. If status is not active then I put &lt;CODE&gt;"NA"&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval abc=if(processState="active", cpuUsage, "NA")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So similarly you can make your own case which should work fine.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2016 17:13:46 GMT</pubDate>
    <dc:creator>gokadroid</dc:creator>
    <dc:date>2016-11-24T17:13:46Z</dc:date>
    <item>
      <title>eval if clarification</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-if-clarification/m-p/237985#M176130</link>
      <description>&lt;P&gt;I have a document field that opens a document if available and it displays "no document found" if there is no document available.&lt;BR /&gt;
But i want to add something to the document field.&lt;/P&gt;

&lt;P&gt;i want to have a checkpoint that says pass or fail. If PASS, it should display either "document available" or "no document found"&lt;BR /&gt;
if FAIL, it should display "Try again"&lt;/P&gt;

&lt;P&gt;so im thinking,&lt;BR /&gt;
is "eval if command" capable with this?&lt;/P&gt;

&lt;P&gt;like&lt;/P&gt;

&lt;P&gt;|eval document = if (checkpoint == "pass", ??? , "Try again")&lt;/P&gt;

&lt;P&gt;i wanted to make that question mark the document field that displays "document available" or "no document found"&lt;/P&gt;

&lt;P&gt;is it possible?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 15:48:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-if-clarification/m-p/237985#M176130</guid>
      <dc:creator>bonnlbbelandres</dc:creator>
      <dc:date>2016-11-24T15:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: eval if clarification</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-if-clarification/m-p/237986#M176131</link>
      <description>&lt;P&gt;Yes you can do that similar to my example below:&lt;/P&gt;

&lt;P&gt;In my example below, &lt;CODE&gt;abc&lt;/CODE&gt; is the new variable I create. &lt;CODE&gt;processState&lt;/CODE&gt; is another variable which will have &lt;CODE&gt;active&lt;/CODE&gt; or &lt;CODE&gt;ft&lt;/CODE&gt;, on which I am checking for status. Based on &lt;CODE&gt;active&lt;/CODE&gt; status, I use another variable &lt;CODE&gt;cpuUsage&lt;/CODE&gt; which will have more than one kind of value and get assigned to &lt;CODE&gt;abc&lt;/CODE&gt;. If status is not active then I put &lt;CODE&gt;"NA"&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval abc=if(processState="active", cpuUsage, "NA")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So similarly you can make your own case which should work fine.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 17:13:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-if-clarification/m-p/237986#M176131</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-11-24T17:13:46Z</dc:date>
    </item>
  </channel>
</rss>

