<?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: case and isnull for multiple fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/case-and-isnull-for-multiple-fields/m-p/111862#M29332</link>
    <description>&lt;P&gt;Try this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval main = case(isnotnull(test1), test1, isnotnull(test2), test2, isnotnull(test3), test3, isnotnull(test4), test4, 1=1 , "All Test Are Null")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Main's value should be test1 / test2 / test3 / test4 in-case test1 is empty option goes to test2, if test2 is empty then option goes to test 3 and test4 like wise.&lt;/P&gt;

&lt;P&gt;If suppose test1, test2, test3, test4 contains value then test1 would be assigned to main. if not "All Test are Null" will be assigned to main.&lt;/P&gt;

&lt;P&gt;Hope this will help you.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Nov 2014 02:45:32 GMT</pubDate>
    <dc:creator>vasanthmss</dc:creator>
    <dc:date>2014-11-13T02:45:32Z</dc:date>
    <item>
      <title>case and isnull for multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/case-and-isnull-for-multiple-fields/m-p/111861#M29331</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;

&lt;P&gt;Working on a query that if one field is null then it uses another field and if that field isnull it uses another.  Will case work like that in a linear operation left-to-right or is there a better option?&lt;/P&gt;

&lt;P&gt;eval main=case(isnull(test1),test2,test1,isnull(test2),test3,test2,isnull(test3),test4,test3,1=1,"All Test Are Null)&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2014 02:17:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/case-and-isnull-for-multiple-fields/m-p/111861#M29331</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-11-13T02:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: case and isnull for multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/case-and-isnull-for-multiple-fields/m-p/111862#M29332</link>
      <description>&lt;P&gt;Try this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval main = case(isnotnull(test1), test1, isnotnull(test2), test2, isnotnull(test3), test3, isnotnull(test4), test4, 1=1 , "All Test Are Null")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Main's value should be test1 / test2 / test3 / test4 in-case test1 is empty option goes to test2, if test2 is empty then option goes to test 3 and test4 like wise.&lt;/P&gt;

&lt;P&gt;If suppose test1, test2, test3, test4 contains value then test1 would be assigned to main. if not "All Test are Null" will be assigned to main.&lt;/P&gt;

&lt;P&gt;Hope this will help you.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2014 02:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/case-and-isnull-for-multiple-fields/m-p/111862#M29332</guid>
      <dc:creator>vasanthmss</dc:creator>
      <dc:date>2014-11-13T02:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: case and isnull for multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/case-and-isnull-for-multiple-fields/m-p/111863#M29333</link>
      <description>&lt;P&gt;Take a look at the eval coalesce function - as the documentation states&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;This function takes an arbitrary number of arguments and returns the first value that is not null.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 13 Nov 2014 14:29:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/case-and-isnull-for-multiple-fields/m-p/111863#M29333</guid>
      <dc:creator>davebrooking</dc:creator>
      <dc:date>2014-11-13T14:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: case and isnull for multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/case-and-isnull-for-multiple-fields/m-p/111864#M29334</link>
      <description>&lt;P&gt;Thanks - worked like a dream&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2014 22:14:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/case-and-isnull-for-multiple-fields/m-p/111864#M29334</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-11-13T22:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: case and isnull for multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/case-and-isnull-for-multiple-fields/m-p/111865#M29335</link>
      <description>&lt;P&gt;Cheers !!!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2014 12:40:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/case-and-isnull-for-multiple-fields/m-p/111865#M29335</guid>
      <dc:creator>vasanthmss</dc:creator>
      <dc:date>2014-11-14T12:40:32Z</dc:date>
    </item>
  </channel>
</rss>

