Dashboards & Visualizations

Unset token after timepicker/time is changed

rewritex
Contributor

I would like advice on how to unset my dashboard token whenever a new search timeframe is selected using the timepicker.
Thank you

<form>
  <label>Dashboard Example</label>
  <fieldset submitButton="false">
    <input type="time" token="time1">
      <label></label>
      <default>
        <earliest>-15m</earliest>
        <latest>now</latest>
      </default>
    </input>
  </fieldset>
  <row>
    <panel>
0 Karma

dflodstrom
Builder

You can do this by adding a <change> element to your time input. Here is an example of this where the token I'm unsetting is called "tok"

<fieldset submitButton="false">
    <input type="time" token="field1">
      <label></label>
      <default>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </default>
      <change>
        <unset token="var"></unset>
      </change>
    </input>
  </fieldset>

niketn
Legend

@rewritex, Do you want to unset the only the form tokens i.e. tokens related to other inputs in the dashboard, or all the other tokens as well? If it is for other tokens how are they being set? Would it be possible for you to add the Simple XML code for other tokens that need to be reset?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...