<?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 run two different searches in a dashboard based on the selected time range? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-two-different-searches-in-a-dashboard-based-on-the/m-p/233021#M69150</link>
    <description>&lt;P&gt;Sure, I'll try this and update you. Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jan 2017 23:02:30 GMT</pubDate>
    <dc:creator>Kukkadapu</dc:creator>
    <dc:date>2017-01-09T23:02:30Z</dc:date>
    <item>
      <title>How to run two different searches in a dashboard based on the selected time range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-two-different-searches-in-a-dashboard-based-on-the/m-p/233019#M69148</link>
      <description>&lt;P&gt;Hi, How do I run two different searches in a dashboard based on the time picker selected? &lt;/P&gt;

&lt;P&gt;If the time selected is &lt;BR /&gt;
Today or last 24 hours         - Run Query 1 to display the result in the single panel&lt;BR /&gt;
Not Today OR last 24 hours - Run Query 2&lt;BR /&gt;
Other    (Last two days, etc)  - Run Query 3&lt;/P&gt;

&lt;P&gt;Can we run different searches based on the time picker selected?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 17:48:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-two-different-searches-in-a-dashboard-based-on-the/m-p/233019#M69148</guid>
      <dc:creator>Kukkadapu</dc:creator>
      <dc:date>2017-01-09T17:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to run two different searches in a dashboard based on the selected time range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-two-different-searches-in-a-dashboard-based-on-the/m-p/233020#M69149</link>
      <description>&lt;P&gt;This is just an idea so far: try to add &lt;CODE&gt;&amp;lt;condition&amp;gt;&lt;/CODE&gt; and &lt;CODE&gt;&amp;lt;eval&amp;gt;&lt;/CODE&gt; children under &lt;CODE&gt;&amp;lt;change&amp;gt;&lt;/CODE&gt; child of the &lt;CODE&gt;&amp;lt;input type="time"...&amp;gt;&lt;/CODE&gt; tag. Analyze the values and set or unset the tokens according to your needs. Then create a few panels at most one of which will be visible using &lt;CODE&gt;depends=&lt;/CODE&gt; and &lt;CODE&gt;rejects=&lt;/CODE&gt; attributes in those panels' tags.&lt;/P&gt;

&lt;P&gt;You'll have to read "Dashboards and Visualizations" manual to do everything right. Unfortunately, the documentation does not include ready examples of such complex behavior, but that's the beauty of Splunk development.&lt;/P&gt;

&lt;P&gt;Another, a somewhat different idea, is to add &lt;CODE&gt;id=&lt;/CODE&gt; attribute to your time input and create a JavaScript which will find the time picker by that id and hook a handler to the .change event. In that handler, you can set and unset some tokens to achieve the same result (your panels should still have &lt;CODE&gt;depends=&lt;/CODE&gt; and &lt;CODE&gt;rejects=&lt;/CODE&gt; attributes for this to work), but you'll have a much better control of the algorithm.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 18:25:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-two-different-searches-in-a-dashboard-based-on-the/m-p/233020#M69149</guid>
      <dc:creator>arkadyz1</dc:creator>
      <dc:date>2017-01-09T18:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to run two different searches in a dashboard based on the selected time range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-two-different-searches-in-a-dashboard-based-on-the/m-p/233021#M69150</link>
      <description>&lt;P&gt;Sure, I'll try this and update you. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 23:02:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-two-different-searches-in-a-dashboard-based-on-the/m-p/233021#M69150</guid>
      <dc:creator>Kukkadapu</dc:creator>
      <dc:date>2017-01-09T23:02:30Z</dc:date>
    </item>
  </channel>
</rss>

