Archive

How to reset the link on a link list input

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

SplunkTrust
SplunkTrust

@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

New Member

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

0 Karma

SplunkTrust
SplunkTrust

@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

SplunkTrust
SplunkTrust

@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