<?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 get latest parameter from csv disregarding empty values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393500#M172887</link>
    <description>&lt;P&gt;in that case, it might not be null() but just an empty space , try adding this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;if(isnull(param) OR param=="", 50, param)&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Feb 2019 15:03:32 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2019-02-21T15:03:32Z</dc:date>
    <item>
      <title>How to get latest parameter from csv disregarding empty values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393497#M172884</link>
      <description>&lt;P&gt;Hi splunk comunity!&lt;/P&gt;

&lt;P&gt;I have dashboard with text input, which starts to execute when i change my parameter in text box, in query i write this parameter to my csv file.&lt;BR /&gt;
In another dashboard i'm trying to read latest value of this parameter, but if i post an empty field in my first dashboard i get an empty result in my second.&lt;BR /&gt;
So the question is how to check an empty value like method isEmpty() in java or how to ban empty fields passing to csv file in first dashboard?&lt;BR /&gt;
Or how can i display last not empty value?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 14:00:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393497#M172884</guid>
      <dc:creator>mishaaaaaaaaaa</dc:creator>
      <dc:date>2019-02-21T14:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get latest parameter from csv disregarding empty values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393498#M172885</link>
      <description>&lt;P&gt;@mishaaaaaaaaaa ,&lt;/P&gt;

&lt;P&gt;Either use &lt;CODE&gt;| where isnotnull(field)&lt;/CODE&gt; while reading or check with &lt;CODE&gt;isnotnull(field)&lt;/CODE&gt; or &lt;CODE&gt;isnull(field)&lt;/CODE&gt; before writing,&lt;/P&gt;

&lt;P&gt;Reference : &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.4/SearchReference/InformationalFunctions"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.4/SearchReference/InformationalFunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 14:09:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393498#M172885</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-02-21T14:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get latest parameter from csv disregarding empty values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393499#M172886</link>
      <description>&lt;P&gt;@renjith.nair  This doesn't work, i've already tryed something like this, but i still get an emty field in my second dushboard&lt;/P&gt;

&lt;P&gt;| makeresults&lt;BR /&gt;
| eval param="$firstParam$"&lt;BR /&gt;
| eval parameter=if(isnull(param), 50, param)&lt;BR /&gt;
| outputcsv append=true mishasTestParametrization.csv&lt;BR /&gt;
| table parameter&lt;/P&gt;

&lt;P&gt;| inputcsv mishasTestParametrization.csv&lt;BR /&gt;
| stats latest(parameter) as latestParam&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 14:22:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393499#M172886</guid>
      <dc:creator>mishaaaaaaaaaa</dc:creator>
      <dc:date>2019-02-21T14:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get latest parameter from csv disregarding empty values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393500#M172887</link>
      <description>&lt;P&gt;in that case, it might not be null() but just an empty space , try adding this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;if(isnull(param) OR param=="", 50, param)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 15:03:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393500#M172887</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-02-21T15:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get latest parameter from csv disregarding empty values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393501#M172888</link>
      <description>&lt;P&gt;@renjith.nair yes this works, but i understud that this is not what i want. I need to write to csv if my param is not empty and don't write if it's empty&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 06:27:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393501#M172888</guid>
      <dc:creator>mishaaaaaaaaaa</dc:creator>
      <dc:date>2019-02-22T06:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get latest parameter from csv disregarding empty values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393502#M172889</link>
      <description>&lt;P&gt;@mishaaaaaaaaaa ,&lt;BR /&gt;
Same can be used in the outputlookup as well. Taking your example&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval param="$firstParam$"
| where param!="" AND isnotnull(param)
| outputcsv append=true mishasTestParametrization.csv
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Feb 2019 14:10:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393502#M172889</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-02-22T14:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get latest parameter from csv disregarding empty values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393503#M172890</link>
      <description>&lt;P&gt;thanks a lot, that works perfect!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 06:19:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-parameter-from-csv-disregarding-empty-values/m-p/393503#M172890</guid>
      <dc:creator>mishaaaaaaaaaa</dc:creator>
      <dc:date>2019-02-25T06:19:01Z</dc:date>
    </item>
  </channel>
</rss>

