<?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 How to change the displayed time filter when a different dropdown value is selected? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470972#M80952</link>
    <description>&lt;P&gt;I have two filters on my dashboard. One for time (using the Time filter) and one for environment (using the Dropdown filter). When I select a value from environment, it updates the time token and the dashboard panels correctly. However, it does not change the displayed value in the time filter dropdown.&lt;/P&gt;

&lt;P&gt;For example: The dashboard defaults to Environment: Test and Time: Last 60 Minutes. If I change the Environment to Prod, then it changes the Time to Last 24 Hours, but the dropdown does not reflect that, which is confusing.&lt;/P&gt;

&lt;P&gt;How do I get the text in the time dropdown to update when I select a value from another dropdown?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;init&amp;gt;
    &amp;lt;set token="index"&amp;gt;test&amp;lt;/set&amp;gt;
    &amp;lt;set token="time"&amp;gt; -60m@m&amp;lt;/set&amp;gt;
  &amp;lt;/init&amp;gt;
  &amp;lt;label&amp;gt;Test Dashboard&amp;lt;/label&amp;gt;
  &amp;lt;description&amp;gt;Test description.&amp;lt;/description&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="time"&amp;gt;
      &amp;lt;label&amp;gt;Time-Picker&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="index" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Environment&amp;lt;/label&amp;gt;
      &amp;lt;choice value="prod"&amp;gt;Prod&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="test"&amp;gt;Test&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;test&amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition label="Test"&amp;gt;
          &amp;lt;set token="spacename"&amp;gt;cf_space_name="development"&amp;lt;/set&amp;gt;
          &amp;lt;set token="time"&amp;gt;-60m@m&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition label="Prod"&amp;gt;
          &amp;lt;set token="spacename"&amp;gt;cf_space_name="production"&amp;lt;/set&amp;gt;
          &amp;lt;set token="time"&amp;gt;@d&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 03 Sep 2019 19:25:22 GMT</pubDate>
    <dc:creator>stephenggilmore</dc:creator>
    <dc:date>2019-09-03T19:25:22Z</dc:date>
    <item>
      <title>How to change the displayed time filter when a different dropdown value is selected?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470972#M80952</link>
      <description>&lt;P&gt;I have two filters on my dashboard. One for time (using the Time filter) and one for environment (using the Dropdown filter). When I select a value from environment, it updates the time token and the dashboard panels correctly. However, it does not change the displayed value in the time filter dropdown.&lt;/P&gt;

&lt;P&gt;For example: The dashboard defaults to Environment: Test and Time: Last 60 Minutes. If I change the Environment to Prod, then it changes the Time to Last 24 Hours, but the dropdown does not reflect that, which is confusing.&lt;/P&gt;

&lt;P&gt;How do I get the text in the time dropdown to update when I select a value from another dropdown?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;init&amp;gt;
    &amp;lt;set token="index"&amp;gt;test&amp;lt;/set&amp;gt;
    &amp;lt;set token="time"&amp;gt; -60m@m&amp;lt;/set&amp;gt;
  &amp;lt;/init&amp;gt;
  &amp;lt;label&amp;gt;Test Dashboard&amp;lt;/label&amp;gt;
  &amp;lt;description&amp;gt;Test description.&amp;lt;/description&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="time"&amp;gt;
      &amp;lt;label&amp;gt;Time-Picker&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-60m@m&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="index" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Environment&amp;lt;/label&amp;gt;
      &amp;lt;choice value="prod"&amp;gt;Prod&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="test"&amp;gt;Test&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;test&amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition label="Test"&amp;gt;
          &amp;lt;set token="spacename"&amp;gt;cf_space_name="development"&amp;lt;/set&amp;gt;
          &amp;lt;set token="time"&amp;gt;-60m@m&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition label="Prod"&amp;gt;
          &amp;lt;set token="spacename"&amp;gt;cf_space_name="production"&amp;lt;/set&amp;gt;
          &amp;lt;set token="time"&amp;gt;@d&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Sep 2019 19:25:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470972#M80952</guid>
      <dc:creator>stephenggilmore</dc:creator>
      <dc:date>2019-09-03T19:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the displayed time filter when a different dropdown value is selected?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470973#M80953</link>
      <description>&lt;P&gt;Try changing &lt;CODE&gt;&amp;lt;set token="time"&amp;gt;&lt;/CODE&gt; to &lt;CODE&gt;&amp;lt;set token="form.time.earliest"&amp;gt;&lt;/CODE&gt;. I figured it out by looking at the values in the URL when changing the time directly. You'll also want to change it in your &lt;CODE&gt;&amp;lt;init&amp;gt;&lt;/CODE&gt; setting. Here's a run-anywhere dashboard:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;init&amp;gt;
    &amp;lt;set token="index"&amp;gt;test&amp;lt;/set&amp;gt;
    &amp;lt;set token="form.time.earliest"&amp;gt;-60m@m&amp;lt;/set&amp;gt;
  &amp;lt;/init&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="time" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Time Picker&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="index" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Environment&amp;lt;/label&amp;gt;
      &amp;lt;choice value="prod"&amp;gt;Prod&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="test"&amp;gt;Test&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;test&amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition label="Test"&amp;gt;
          &amp;lt;set token="spacename"&amp;gt;cf_space_name="development"&amp;lt;/set&amp;gt;
          &amp;lt;set token="form.time.earliest"&amp;gt;-60m@m&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition label="Prod"&amp;gt;
          &amp;lt;set token="spacename"&amp;gt;cf_space_name="production"&amp;lt;/set&amp;gt;
          &amp;lt;set token="form.time.earliest"&amp;gt;@d&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;html&amp;gt;
      $time$ --- $form.time.earliest$ --- $spacename$ 
    &amp;lt;/html&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;event&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$time.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$time.latest$&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;50&amp;lt;/option&amp;gt;
        &amp;lt;option name="list.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="list.wrap"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="maxLines"&amp;gt;5&amp;lt;/option&amp;gt;
        &amp;lt;option name="raw.drilldown"&amp;gt;full&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="table.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
        &amp;lt;option name="table.sortDirection"&amp;gt;asc&amp;lt;/option&amp;gt;
        &amp;lt;option name="table.wrap"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="type"&amp;gt;list&amp;lt;/option&amp;gt;
      &amp;lt;/event&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Sep 2019 20:31:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470973#M80953</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2019-09-03T20:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the displayed time filter when a different dropdown value is selected?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470974#M80954</link>
      <description>&lt;P&gt;Note the typo here: &lt;CODE&gt;&amp;lt;set token="time"&amp;gt; -60m@m&amp;lt;/set&amp;gt;&lt;/CODE&gt; (the space before the '-' sign)&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 20:38:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470974#M80954</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2019-09-03T20:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the displayed time filter when a different dropdown value is selected?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470975#M80955</link>
      <description>&lt;P&gt;Thanks for pointing that out! I didn't even notice.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 21:08:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470975#M80955</guid>
      <dc:creator>stephenggilmore</dc:creator>
      <dc:date>2019-09-03T21:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the displayed time filter when a different dropdown value is selected?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470976#M80956</link>
      <description>&lt;P&gt;This worked perfectly! Thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 21:09:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470976#M80956</guid>
      <dc:creator>stephenggilmore</dc:creator>
      <dc:date>2019-09-03T21:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the displayed time filter when a different dropdown value is selected?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470977#M80957</link>
      <description>&lt;P&gt;You're welcome. Thanks for marking the answer!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 21:10:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-the-displayed-time-filter-when-a-different/m-p/470977#M80957</guid>
      <dc:creator>jacobpevans</dc:creator>
      <dc:date>2019-09-03T21:10:59Z</dc:date>
    </item>
  </channel>
</rss>

