<?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: How to modify output based on condition applied to each rows in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-output-based-on-condition-applied-to-each-rows/m-p/305897#M91837</link>
    <description>&lt;P&gt;You can try like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...|eval Status=if (Name="pen" AND Quantity &amp;gt;1 ,"Good", "Bad")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 23 Feb 2018 06:25:07 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2018-02-23T06:25:07Z</dc:date>
    <item>
      <title>How to modify output based on condition applied to each rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-output-based-on-condition-applied-to-each-rows/m-p/305896#M91836</link>
      <description>&lt;P&gt;I have a query that output below, Status column is generated based on if condition. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval Status = if(Quantity&amp;gt;10,Good,BAD)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Output &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Name           Quantity           Status
pen                20              Good    
book               13              Good
riddle             2               Bad
note               60              Good
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is it possible to apply if or any other conditions to each row ? like if pen Quantity is more than 1 then say Good, &lt;BR /&gt;
 if book Quantity is less than 10 is Bad ?. In short, applying conditions to each row instead of applying at one column level. &lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 06:14:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-output-based-on-condition-applied-to-each-rows/m-p/305896#M91836</guid>
      <dc:creator>ibob0304</dc:creator>
      <dc:date>2018-02-23T06:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify output based on condition applied to each rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-output-based-on-condition-applied-to-each-rows/m-p/305897#M91837</link>
      <description>&lt;P&gt;You can try like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...|eval Status=if (Name="pen" AND Quantity &amp;gt;1 ,"Good", "Bad")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Feb 2018 06:25:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-output-based-on-condition-applied-to-each-rows/m-p/305897#M91837</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-23T06:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify output based on condition applied to each rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-output-based-on-condition-applied-to-each-rows/m-p/305898#M91838</link>
      <description>&lt;P&gt;Yes you can are &lt;CODE&gt;case&lt;/CODE&gt;if you are looking for applying conditions to each row&lt;/P&gt;

&lt;P&gt;You can try something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...|eval Status=case(Name="pen" AND Quantity&amp;gt;1,"Good",Name="book" AND Quantity&amp;lt;10,"Bad")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;In this way you can add condition for other rows as well i.e. for riddle note and so on.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 07:35:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-output-based-on-condition-applied-to-each-rows/m-p/305898#M91838</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-02-23T07:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify output based on condition applied to each rows</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-output-based-on-condition-applied-to-each-rows/m-p/305899#M91839</link>
      <description>&lt;P&gt;That worked.. Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 01:22:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-output-based-on-condition-applied-to-each-rows/m-p/305899#M91839</guid>
      <dc:creator>ibob0304</dc:creator>
      <dc:date>2018-02-27T01:22:20Z</dc:date>
    </item>
  </channel>
</rss>

