<?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: Why am I getting no results from my saved search with append when I extend the range on the dashboard time picker? in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237991#M4805</link>
    <description>&lt;P&gt;Hi @woodcock, thank you for coming back to me with this, it is really very interesting.&lt;/P&gt;

&lt;P&gt;I've used your suggestion on my sub searches and it works great, but when I try to use this method for the query will pulls all the subsearches together, my first subsearch contains a 'non streaming event', so unfortunately it doesn't solve my initial problem.&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2016 12:15:59 GMT</pubDate>
    <dc:creator>IRHM73</dc:creator>
    <dc:date>2016-05-05T12:15:59Z</dc:date>
    <item>
      <title>Why am I getting no results from my saved search with append when I extend the range on the dashboard time picker?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237987#M4801</link>
      <description>&lt;P&gt;Hi, I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;I have two saved searches as below:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Form Submission&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main auditSource=for-frontend auditType=FormSubmission detail.referenceNumber="$refno$"  
| append [search index=main "\" auditSource\":\"for-frontend\"" "\"auditType\":\"FormSubmission\"" NOT auditSource=*    
| spath   
| search "auditType"="FormSubmission"]  
| eval stime=strptime('detail.submitted', "%Y-%m-%dT%H:%M:%S.%3N")     
| convert timeformat="%d/%b/%Y %H:%M:%S" ctime(stime)     
| rename stime as "Submission Date &amp;amp; Time", auditType as "Audit Type", detail.referenceNumber as "Ref No."    
| table "Submission Date &amp;amp; Time", "Ref No.", "Audit Type"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Request Received&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main auditSource=for-hod-adapter auditType=RequestReceived 
| append [search index=main "\" auditSource\":\"for-hod-adapter\"" "\"auditType\":\"RequestReceived\"" NOT auditSource=*
| spath
| search "auditType"="RequestReceived"]
| eval refno=substr('detail.referenceNumber',1,7)
| rex field=detail.input "\/(?&amp;lt;refno&amp;gt;\d+)$"
| rex field=detail.input "for\/(?&amp;lt;refnopt1&amp;gt;[^\/]+)\/(?&amp;lt;refnopt2&amp;gt;[^\/]+)\/"
| STRCAT refnopt1 refnopt2 compref
| eval referencenumber=coalesce(refno, compref)
| search referencenumber="$refno$"
| eval stime=strptime(generatedAt, "%Y-%m-%dT%H:%M:%S.%3N")
| convert timeformat="%d/%b/%Y %H:%M:%S" ctime(stime)
| rename stime as "Submission Date &amp;amp; Time", auditType as "Audit Type", detail.responseMessage as "Reason for Failure", referencenumber as "Ref No."
| table "Submission Date &amp;amp; Time", "Ref No.", "Audit Type", "Reason for Failure"
| sort +"Submission Date &amp;amp; Time"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;NB.&lt;/STRONG&gt; The &lt;STRONG&gt;="$refno$"&lt;/STRONG&gt; rows. This so I can link this to a token on my dashboard.&lt;/P&gt;

&lt;P&gt;Both of these saved searches have a start date of 01/01/16 and an end date of "now", i.e. current date&lt;/P&gt;

&lt;P&gt;The dashboard that they run in contains an input box (hence the token) and a 'timepicker'. Independently they run fine irrespective of the timerange selected in the 'timepicker'.&lt;/P&gt;

&lt;P&gt;In a final panel, I pull both saved searches together using the following search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| savedsearch "Form Submission" refno="$refno$"]  
| append [| savedsearch "Request Received" refno="$refno$"] 
| fields "Submission Date &amp;amp; Time", "Ref No.", "Audit Type", "Submission ID", "Message Received", "Satisfaction Rating", "Feedback Comments", "Error Message", "Reason for Failure"
| sort +"Submission Date &amp;amp; Time"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is where I have the issue:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;If I select the 'timepicker' range on my dashboard from &lt;STRONG&gt;01 March&lt;/STRONG&gt; to Current Date all of the expected results are returned.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;If I select the 'timepicker' range on my dashboard from &lt;STRONG&gt;01 February&lt;/STRONG&gt; to Current Date all of the expected results are returned.&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;However, if I select the the 'timepicker' range from 01 January to Current Date there are no results returned.&lt;/P&gt;

&lt;P&gt;I have to admit this has left me baffled, because all I'm doing is extending the time range.&lt;/P&gt;

&lt;P&gt;I just wondered whether someone could possibly look at this please and let me know where I've gone wrong.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chriss&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 06:58:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237987#M4801</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2016-05-04T06:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting no results from my saved search with append when I extend the range on the dashboard time picker?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237988#M4802</link>
      <description>&lt;P&gt;You should use the job inspector and look at search.log, etc. to see what error if any are occurring.   Hopefully there is something and you can post that here.&lt;/P&gt;

&lt;P&gt;umm... sorry i guess there isnt a job inspector on dashboard &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;How about index=_internal log_level=ERROR OR log_level=WARN?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:35:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237988#M4802</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T09:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting no results from my saved search with append when I extend the range on the dashboard time picker?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237989#M4803</link>
      <description>&lt;P&gt;If you hard code a value for $refno$ do you experience the same error?&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 13:24:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237989#M4803</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2016-05-04T13:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting no results from my saved search with append when I extend the range on the dashboard time picker?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237990#M4804</link>
      <description>&lt;P&gt;Avoid using &lt;CODE&gt;append&lt;/CODE&gt; whenever possible because it is governed by the 10K subsearch limit.  Try using &lt;CODE&gt;appendpipe&lt;/CODE&gt; instead of &lt;CODE&gt;append&lt;/CODE&gt; and also try using &lt;CODE&gt;multisearch&lt;/CODE&gt; which does not use &lt;CODE&gt;append&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;multisearch
[search index=main auditSource=for-frontend auditType=FormSubmission detail.referenceNumber="$refno$"]
[search index=main "\" auditSource\":\"for-frontend\"" "\"auditType\":\"FormSubmission\"" NOT auditSource=*    
    | spath   
    | search "auditType"="FormSubmission"]  
 | eval stime=strptime('detail.submitted', "%Y-%m-%dT%H:%M:%S.%3N")     
 | convert timeformat="%d/%b/%Y %H:%M:%S" ctime(stime)     
 | rename stime as "Submission Date &amp;amp; Time", auditType as "Audit Type", detail.referenceNumber as "Ref No."    
 | table "Submission Date &amp;amp; Time", "Ref No.", "Audit Type"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 May 2016 15:41:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237990#M4804</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-04T15:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting no results from my saved search with append when I extend the range on the dashboard time picker?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237991#M4805</link>
      <description>&lt;P&gt;Hi @woodcock, thank you for coming back to me with this, it is really very interesting.&lt;/P&gt;

&lt;P&gt;I've used your suggestion on my sub searches and it works great, but when I try to use this method for the query will pulls all the subsearches together, my first subsearch contains a 'non streaming event', so unfortunately it doesn't solve my initial problem.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 12:15:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237991#M4805</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2016-05-05T12:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting no results from my saved search with append when I extend the range on the dashboard time picker?</title>
      <link>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237992#M4806</link>
      <description>&lt;P&gt;Hi @woodcock, I just wanted to let you know that I went away and re-worked this and got the final joined up query to work:&lt;/P&gt;

&lt;P&gt;The solution was:&lt;/P&gt;

&lt;P&gt;| multisearch [ savedsearch "Saved For Later" refno="$refno$"]&lt;BR /&gt;&lt;BR /&gt;
[ savedsearch "Form Submission" refno="$refno$"] &lt;BR /&gt;
[ savedsearch "Submissions Accepted @ HOD" refno="$refno$"] &lt;BR /&gt;
[ savedsearch "Submissions Rejected @ HOD" refno="$refno$"] &lt;BR /&gt;
[ savedsearch "Satisfaction Ratings" refno="$refno$"] &lt;BR /&gt;
[ savedsearch "Satisfaction Comments" refno="$refno$"] &lt;BR /&gt;
[ savedsearch "Request Received" refno="$refno$"] &lt;BR /&gt;
[ savedsearch "Internal Server Error" refno="$refno$"] &lt;BR /&gt;
| table &lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 06:09:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Why-am-I-getting-no-results-from-my-saved-search-with-append/m-p/237992#M4806</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2016-05-09T06:09:51Z</dc:date>
    </item>
  </channel>
</rss>

