Dashboards & Visualizations

How to display the label from the time field token from the time picker?

dbcase
Motivator

Hi,

I would like to display the label from the time field token from the time picker. I can display the value by using (timefield).earliest but it shows up as -24h@h which is sorta readable but not as good as Last 24 hrs. How can I display the label vs the value?

0 Karma
1 Solution

niketn
Legend

@dbcase case, please refer to one of my recent answers. Hope you are looking for the same: https://answers.splunk.com/answers/633356/whats-the-token-name-for-the-time-pickers-display.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@dbcase case, please refer to one of my recent answers. Hope you are looking for the same: https://answers.splunk.com/answers/633356/whats-the-token-name-for-the-time-pickers-display.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

dbcase
Motivator

Hi Niketnialy,

This one worked perfect

  <input type="time" searchWhenChanged="true">
       <label>Enter time range</label>
       <default>
         <earliest>-1d@d</earliest>
         <latest>@d</latest>
       </default>
       <change>
         <set token="displayTime">($label$)</set>
       </change>
     </input>
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...