<?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 Question on no data in index &amp;quot;no results found&amp;quot; in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Question-on-no-data-in-index-quot-no-results-found-quot/m-p/477582#M143368</link>
    <description>&lt;P&gt;I have 2 situations to address..&lt;BR /&gt;
1. if no data in index for timeframe , create a blank row with "no data" and come out of query&lt;BR /&gt;
2. if data found, then eval next steps , if result is 0 , then create a blank row  with "0" as data.&lt;/P&gt;

&lt;P&gt;can both of these be achieved in a single query.&lt;BR /&gt;
basically search index for data, if data not found, create "nodata" row, exit,&lt;BR /&gt;
else if data found, but no results on eval, then create "0" row ...&lt;/P&gt;

&lt;P&gt;hope i am clear with my question.&lt;/P&gt;</description>
    <pubDate>Sat, 22 Feb 2020 10:49:15 GMT</pubDate>
    <dc:creator>jiaqya</dc:creator>
    <dc:date>2020-02-22T10:49:15Z</dc:date>
    <item>
      <title>Question on no data in index "no results found"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-no-data-in-index-quot-no-results-found-quot/m-p/477582#M143368</link>
      <description>&lt;P&gt;I have 2 situations to address..&lt;BR /&gt;
1. if no data in index for timeframe , create a blank row with "no data" and come out of query&lt;BR /&gt;
2. if data found, then eval next steps , if result is 0 , then create a blank row  with "0" as data.&lt;/P&gt;

&lt;P&gt;can both of these be achieved in a single query.&lt;BR /&gt;
basically search index for data, if data not found, create "nodata" row, exit,&lt;BR /&gt;
else if data found, but no results on eval, then create "0" row ...&lt;/P&gt;

&lt;P&gt;hope i am clear with my question.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 10:49:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-no-data-in-index-quot-no-results-found-quot/m-p/477582#M143368</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2020-02-22T10:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Question on no data in index "no results found"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-no-data-in-index-quot-no-results-found-quot/m-p/477583#M143369</link>
      <description>&lt;P&gt;There is no concept of "come out of query" in SPL.  All queries run to the end.&lt;/P&gt;

&lt;P&gt;To add "no data" to your query, use &lt;CODE&gt;appendpipe&lt;/CODE&gt; near the end.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | appendpipe [ stats count | eval foo="no data" | where count = 0 | fields - count ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Feb 2020 13:06:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-no-data-in-index-quot-no-results-found-quot/m-p/477583#M143369</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-02-22T13:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Question on no data in index "no results found"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-no-data-in-index-quot-no-results-found-quot/m-p/477584#M143370</link>
      <description>&lt;P&gt;i saw the append pipe fix , but was wondering if anybody knew any other trick to get this working..&lt;BR /&gt;
this fix helps me get things going...&lt;/P&gt;

&lt;P&gt;i wish , if then else statements worked with spl the same way they work in other languages..&lt;/P&gt;

&lt;P&gt;thanks..&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 13:37:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-no-data-in-index-quot-no-results-found-quot/m-p/477584#M143370</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2020-02-22T13:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Question on no data in index "no results found"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-no-data-in-index-quot-no-results-found-quot/m-p/477585#M143371</link>
      <description>&lt;P&gt;Go to &lt;A href="https://ideas.splunk.com"&gt;https://ideas.splunk.com&lt;/A&gt; to submit a feature request.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 17:59:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-no-data-in-index-quot-no-results-found-quot/m-p/477585#M143371</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-02-22T17:59:12Z</dc:date>
    </item>
  </channel>
</rss>

