Dashboards & Visualizations

How to unset a token in a a Splunk 6.2 Simple XML dashboard?

Cuyose
Builder

I am not sure why I cannot find a real answer in all the questions asked on this subject. They all seem like hacks and workarounds.

All I want to do is re-populate the token behind an input when the values change. What is happening instead is that it just keeps appending the token based on all the previous inputs.

This is Splunk 6.2 and here is the input

<input type="checkbox" token="operation" searchWhenChanged="false">
      <label>Operation</label>
      <search>
        <query>search query</query>
        <earliest>-60m@m</earliest>
        <latest>now</latest>
      </search>
      <fieldForLabel>operationName</fieldForLabel>
      <fieldForValue>operationName</fieldForValue>
      <prefix>(</prefix>
      <suffix>)</suffix>
      <valuePrefix>svcField=</valuePrefix>
      <delimiter> OR </delimiter>
      <choice value="*">All</choice>
      <default>All,*</default>
    </input>
0 Karma

stephanefotso
Motivator

Hello, this is an example you can use:

    <input type="dropdown" token="operation" searchWhenChanged="true">
            <label>Change the ticket status Update:</label>
            <choice value="Open">Open</choice>
            <choice value="Closed">Closed</choice>
            <default></default>
            <change>
              <condition value="Open">
                <unset token="operation"></set>
                <set token="new_operation">mynewoperation</set>
              </condition>
              <condition value="Closed">
             <unset token="operation"> </set>
                <set token="new_operation2"> mynewoperation2</set>
              </condition>
           </change>
    </input>
SGF

nfilippi_splunk
Splunk Employee
Splunk Employee

Minor change to the above, you need to close the tag. So:

<unset token="operation" />
--OR--
<unset token="operation"></unset>

Also note that if you are looking to unset a token (that is being set as part of the base input), you need to do the following:

<unset token="operation"/>
--AND--
<unset token="form.operation"/>

Cuyose
Builder

I am not quite sure how this is to work. I am calling the token $operation$ in a dashboard panel driven by this input. It appears I am resetting a new token value to something other than $operation$ in your example which will not be recognized in my search.

0 Karma

stephanefotso
Motivator

Thanks nfilippi. Was an error.

SGF
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...