Hi there,
I have managed to enter other fields in Chart title, but I fail to get the selected time period visible with a dynamic variable in the title of a Chart.
So, I can do this chart title:
But I fail to do similar action with time_tok, e.g. like this:
Thanks for any ideas on how to solve this.
And when I enter your phrase inside the search code of that report I got this error:
Try adding the line to the change handler for the time input widget
Thanks again, but that did not work either in the title:
I have also tried $form.time_tok$   (which worked wonders for other fields like $form.care_unit_tok$)
to no avail (-> empty result). 
I have also tried $form.time$    
(-> empty result)
Now I found in the source code: 
| stats count as cnt by Tenant</query>
<earliest>$time_tok.earliest$</earliest>
<latest>$time_tok.latest$</latest>
</search>
and further down:
<input type="time" token="time_tok">
<label>Period</label>
<default>
<earliest>-1y@y</earliest>
<latest>now</latest>
</default>
</input>
Try something like this
<eval token="date">strftime($time_tok.earliest$,"%m %Y")</eval>
					
				
			
			
				
			
			
			
			
			
			
			
		Basically, I want the time for the time period of the search interval.
(Could be as "from-to", or as a dedicated month or year. I am not picky)
I do not need the time for the actual search results. 
Hi, my answer disappeared. Sorry. 
I am using the standard time selection filter in Splunk:
I tried your variables on another Chart: 
Statuses ($time_tok.earliest$ - $time_tok.latest$)
Which rendered this result (which is as you say useless to me and the users): 
Statuses (1688169600 - 1690848000)
Hi @ITWhisperer, thanks!
I am actually updating a Dashboard created by my previous colleague.
So I have this filter already set up like this.
When I use the dashboard, the standard Time period selection comes up like this:
And then on the filter it looks like this in the Time Period selection filter:
Does that help? 
I mean, somehow Splunk gets a value that it shows in the selection filter. 
Probably going to need a bit more information
How is time_tok set? If you are using a time input widget, you can get $time_tok.earliest$ and $time_tok.latest$ as the earliest and latest values chosen.
However, I suspect this may not be in the format you want.
You could either use the change handler (if you have a Classic Dashboard) to evaluate a new token based on the either the earliest or latest time selected, or use the done handler for the panel search and evaluate a token based on the (first row of the) result of the search.