Splunk Search

How to reset the link on a link list input

PBerry7538
New Member

Hi, this is my first post on here, am very new to using SPLUNK so please bear with me if how I am doing things is clunky :). Plus I am learning XML and HTML at the same time so my knowledge is very limited.
I have an Link List input that I have added that allows me to clear any previous displayed hidden panels. The other panels have a depend option set against the drilldown token.
The link works fine the first time you click on it, but if you go back to the same link it is now greyed out and you cannot click on it again. Please could someone tell me what is the best way to get the link to "reset" or gain focus again to allow it to be clicked on and used multiple times if necessary. Below is my snippet:-

  <input type="link" token="field1" searchWhenChanged="false">
    <label></label>
    <choice value="hide">Hide Panel</choice>
    <change>
      <condition value="hide">
        <set token="field1"></set>
        <unset token="drilldown"></unset>
        <unset token="drilldown1"></unset>
        <unset token="drilldown2"></unset>
        <unset token="drilldown3"></unset>
        <unset token="drilldown4"></unset>
        <unset token="drilldown5"></unset>
        <unset token="drilldown6"></unset>
        <unset token="drilldown7"></unset> 

Many thanks for your help. 🙂
Paul

0 Karma
1 Solution

niketn
Legend

@PBerry7583, with Link list you need to provide hide and show options for setting and un-setting the tokens. Following is option in case you want to use Link:

  <fieldset submitButton="false">
    <input type="link" token="field1">
      <label>field1</label>
      <choice value="hide">Hide Panel</choice>
      <choice value="show">Show Panel</choice>
      <change>
        <condition value="hide">
           <unset token="drilldown"></unset>
           <unset token="drilldown1"></unset>
           <unset token="drilldown2"></unset>
           <unset token="drilldown3"></unset>
           <unset token="drilldown4"></unset>
           <unset token="drilldown5"></unset>
           <unset token="drilldown6"></unset>
           <unset token="drilldown7"></unset> 
        </condition>
        <condition value="show">
           <set token="drilldown"></set>
           <set token="drilldown1"></set>
           <set token="drilldown2"></set>
           <set token="drilldown3"></set>
           <set token="drilldown4"></set>
           <set token="drilldown5"></set>
           <set token="drilldown6"></set>
           <set token="drilldown7"></set>
        </condition>
      </change>
      <default>show</default>
    </input>
  </fieldset>

Option 2: Using Checkbox

<input type="checkbox" token="tokShow">
  <label></label>
  <choice value="show">Show Panel</choice>
  <change>
    <condition value="show">
       <set token="drilldown"></set>
       <set token="drilldown1"></set>
       <set token="drilldown2"></set>
       <set token="drilldown3"></set>
       <set token="drilldown4"></set>
       <set token="drilldown5"></set>
       <set token="drilldown6"></set>
       <set token="drilldown7"></set>
    </condition>
    <condition>
       <unset token="drilldown"></unset>
       <unset token="drilldown1"></unset>
       <unset token="drilldown2"></unset>
       <unset token="drilldown3"></unset>
       <unset token="drilldown4"></unset>
       <unset token="drilldown5"></unset>
       <unset token="drilldown6"></unset>
       <unset token="drilldown7"></unset> 
    </condition>
  </change>
</input>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

PBerry7538
New Member

Thanks very much Niketnilay 🙂
The checkbox option worked a treat.

0 Karma

niketn
Legend

@PBerry7538. Glad it worked 🙂 . If single Link option to toggle would have been your only option, then your would have needed Simple XML with JavaScript Extension. But it is better if Checkbox solved your needs as you can handle this in Simple XML.

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

niketn
Legend

@PBerry7583, with Link list you need to provide hide and show options for setting and un-setting the tokens. Following is option in case you want to use Link:

  <fieldset submitButton="false">
    <input type="link" token="field1">
      <label>field1</label>
      <choice value="hide">Hide Panel</choice>
      <choice value="show">Show Panel</choice>
      <change>
        <condition value="hide">
           <unset token="drilldown"></unset>
           <unset token="drilldown1"></unset>
           <unset token="drilldown2"></unset>
           <unset token="drilldown3"></unset>
           <unset token="drilldown4"></unset>
           <unset token="drilldown5"></unset>
           <unset token="drilldown6"></unset>
           <unset token="drilldown7"></unset> 
        </condition>
        <condition value="show">
           <set token="drilldown"></set>
           <set token="drilldown1"></set>
           <set token="drilldown2"></set>
           <set token="drilldown3"></set>
           <set token="drilldown4"></set>
           <set token="drilldown5"></set>
           <set token="drilldown6"></set>
           <set token="drilldown7"></set>
        </condition>
      </change>
      <default>show</default>
    </input>
  </fieldset>

Option 2: Using Checkbox

<input type="checkbox" token="tokShow">
  <label></label>
  <choice value="show">Show Panel</choice>
  <change>
    <condition value="show">
       <set token="drilldown"></set>
       <set token="drilldown1"></set>
       <set token="drilldown2"></set>
       <set token="drilldown3"></set>
       <set token="drilldown4"></set>
       <set token="drilldown5"></set>
       <set token="drilldown6"></set>
       <set token="drilldown7"></set>
    </condition>
    <condition>
       <unset token="drilldown"></unset>
       <unset token="drilldown1"></unset>
       <unset token="drilldown2"></unset>
       <unset token="drilldown3"></unset>
       <unset token="drilldown4"></unset>
       <unset token="drilldown5"></unset>
       <unset token="drilldown6"></unset>
       <unset token="drilldown7"></unset> 
    </condition>
  </change>
</input>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
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!

Index This | What travels the world but is also stuck in place?

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

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...