Dashboards & Visualizations

Unset token through linked list

nabeel652
Builder

I have one panel that contains some rows - upon clicking a row a panel opens on the rights (depends token="$sometoken$"). I have created a single choice link list with the only value "Close". When user clicks on "Close" option of link list in the dependent panel it unsets the $sometoken$ and the RHS panel closes - Works fine up to this point - However, next time when the user tries to drill down the RHS panel opens but now the "Close" choice is already selected and grayed out. So clicking has no effect. I want it to be unselected on the subsequent drilldowns like the first time. Below is the RHS panel code:

<panel depends="$sometoken$">
      <title>Details for $sometoken$</title>
      <input type="link" token="unused" depends="$sometoken$">
        <label></label>
        <choice value="close">Close</choice>
        <change>
          <condition>
            <unset token="sometoken"></unset>
          </condition>
        </change>
        <default>close</default>
        <initialValue>close</initialValue>
        <search>
          <query />
        </search>
      </input>
      <table id="table3">
        <search>
          <query>"Some query populating the table"</query>
          <earliest>0</earliest>
          <latest></latest>
        </search>
        <option name="drilldown">none</option>
        <option name="rowNumbers">true</option>
      </table>
    </panel>
Tags (1)
0 Karma
1 Solution

niketn
Legend

@nabeel652, please check out my answer on creating a show/hide button switcher using Simple XML JS extension.

Since Link and Radio inputs allow click at one choice at a time, you can not click the same choice two times. You either need to use
Option 1) check box instead:
https://answers.splunk.com/answers/506563/how-can-i-show-and-hide-panels-based-on-a-checkbox.html
Or
Option 2) use JavaScript extension for Splunk Link input (or create your own ink/button): https://answers.splunk.com/answers/581652/how-can-i-create-a-button-switcher.html

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

View solution in original post

niketn
Legend

@nabeel652, please check out my answer on creating a show/hide button switcher using Simple XML JS extension.

Since Link and Radio inputs allow click at one choice at a time, you can not click the same choice two times. You either need to use
Option 1) check box instead:
https://answers.splunk.com/answers/506563/how-can-i-show-and-hide-panels-based-on-a-checkbox.html
Or
Option 2) use JavaScript extension for Splunk Link input (or create your own ink/button): https://answers.splunk.com/answers/581652/how-can-i-create-a-button-switcher.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...