<?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 Setting time frame values dynamically for splunk dashboard in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Setting-time-frame-values-dynamically-for-splunk-dashboard/m-p/605270#M49723</link>
    <description>&lt;P&gt;I have a use case where once a particular datetime is entered as input on the dashboard. Need to show search log results panel from two time frames side by side.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;say if the entered value is&amp;nbsp;"07/06/2022:14:00:00"&lt;/P&gt;&lt;P&gt;1) -1hr from the time period entered (here in this case&amp;nbsp;"07/06/2022:13:00:00 -"07/06/2022:14:00:00"&lt;/P&gt;&lt;P&gt;2) From the time period entered to till now&amp;nbsp;(here in this case&amp;nbsp;"07/06/2022:14:00:00 -NOW"&lt;/P&gt;&lt;P&gt;I am capturing the datetime entered as a timetoken&lt;/P&gt;&lt;P&gt;how to set another time token &lt;U&gt;relative to the value entered on screen in dashboard&lt;/U&gt;? so that i can use both these tokens as earliest and latest for the first usecase.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2022 09:02:54 GMT</pubDate>
    <dc:creator>Ashwin3</dc:creator>
    <dc:date>2022-07-12T09:02:54Z</dc:date>
    <item>
      <title>Setting time frame values dynamically for splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Setting-time-frame-values-dynamically-for-splunk-dashboard/m-p/605270#M49723</link>
      <description>&lt;P&gt;I have a use case where once a particular datetime is entered as input on the dashboard. Need to show search log results panel from two time frames side by side.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;say if the entered value is&amp;nbsp;"07/06/2022:14:00:00"&lt;/P&gt;&lt;P&gt;1) -1hr from the time period entered (here in this case&amp;nbsp;"07/06/2022:13:00:00 -"07/06/2022:14:00:00"&lt;/P&gt;&lt;P&gt;2) From the time period entered to till now&amp;nbsp;(here in this case&amp;nbsp;"07/06/2022:14:00:00 -NOW"&lt;/P&gt;&lt;P&gt;I am capturing the datetime entered as a timetoken&lt;/P&gt;&lt;P&gt;how to set another time token &lt;U&gt;relative to the value entered on screen in dashboard&lt;/U&gt;? so that i can use both these tokens as earliest and latest for the first usecase.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 09:02:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Setting-time-frame-values-dynamically-for-splunk-dashboard/m-p/605270#M49723</guid>
      <dc:creator>Ashwin3</dc:creator>
      <dc:date>2022-07-12T09:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Setting time frame values dynamically for splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Setting-time-frame-values-dynamically-for-splunk-dashboard/m-p/605275#M49724</link>
      <description>&lt;P&gt;You can use relative_time to eval tokens in your dashboard&lt;/P&gt;&lt;P&gt;e.g -1h&lt;/P&gt;&lt;PRE&gt;&amp;lt;eval token="new_token"&amp;gt;relative_time($timeToken$,"-1h")&amp;lt;/eval&amp;gt;&lt;/PRE&gt;&lt;P&gt;As for the now you can just use your time field as a earliest token in the search itself.&lt;/P&gt;&lt;P&gt;On both cases you'll probably need to use strftime to process your timestamp token format&lt;/P&gt;&lt;P&gt;From docs:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/tokens" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/tokens&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 09:46:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Setting-time-frame-values-dynamically-for-splunk-dashboard/m-p/605275#M49724</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2022-07-12T09:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Setting time frame values dynamically for splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Setting-time-frame-values-dynamically-for-splunk-dashboard/m-p/605283#M49725</link>
      <description>&lt;P&gt;Thank you. Will try once with this and confirm&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/90723"&gt;@diogofgm&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;lt;eval token="formatted_token"&amp;gt;strptime($timeToken$,"%m/%d/%Y:%T")&amp;lt;/eval&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;lt;eval token="new_token"&amp;gt;relative_time($formatted_token$,"-1h")&amp;lt;/eval&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I am trying with the above one but looks like &amp;lt;eval&amp;gt; is not getting accepted as child node for any of the form elements like &amp;lt;input&amp;gt;, &amp;lt;fieldset&amp;gt; etc. where can we place this &amp;lt;eval&amp;gt; step in UI form?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also is there a way where we can accept datetime as input directly from dashboard. Currently i see a Time input but it does not allow to select a particular time. Hence am using text field for getting the datetime value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 10:33:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Setting-time-frame-values-dynamically-for-splunk-dashboard/m-p/605283#M49725</guid>
      <dc:creator>Ashwin3</dc:creator>
      <dc:date>2022-07-12T10:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Setting time frame values dynamically for splunk dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Setting-time-frame-values-dynamically-for-splunk-dashboard/m-p/605287#M49726</link>
      <description>&lt;P&gt;Inside input &amp;gt; change tags. so it would be input &amp;gt; change &amp;gt; eval&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Check this part of the docs I shared before:&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/tokens#Define_tokens_for_conditional_operations_with_form_inputs" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/Viz/tokens#Define_tokens_for_conditional_operations_with_form_inputs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You could use a time picker since it already creates tokens for you. if you name your time picker timepicker you'll have $timepicker.earliest$ and $timepicker.latest$ and use these to then eval the new tokens&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 11:29:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Setting-time-frame-values-dynamically-for-splunk-dashboard/m-p/605287#M49726</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2022-07-12T11:29:11Z</dc:date>
    </item>
  </channel>
</rss>

