Splunk Search

How to update the table token results depending on the dynamic token selected on radio and passit to multiple link list?

kelz
Explorer

Hi Splunkers,

Is it possible to make a dynamic token results based on the radio and multiple link with same token value.

I want to achieve a result like this.

If I click value "1" on the radio button, link 1 input will show up and the default value for this link input will pass on the table input it should be "A". If I change the value "1" to value "2", link 2 input will show up and default value for it will update the table it should be "D"

Below is my sample query. Appreciate your help on this. Thanks inadvance!

<form>
<label>Multi Link Input</label>
<fieldset submitButton="false">
<input type="radio" token="select_link" searchWhenChanged="true">
<label>Select Link List</label>
<choice value="1">1</choice>
<choice value="2">2</choice>
<change>
<condition value="2">
<set token="show_2">true</set>
<unset token="show_1"></unset>
</condition>
<condition value="1">
<set token="show_1">true</set>
<unset token="show_2"></unset>
</condition>
</change>
<default>1</default>
</input>
<input type="link" token="select" searchWhenChanged="true" depends="$show_1$">
<label>1</label>
<choice value="A">A</choice>
<choice value="B">B</choice>
<choice value="C">C</choice>
<default>A</default>
</input>
<input type="link" token="select" searchWhenChanged="true" depends="$show_2$">
<label>2</label>
<choice value="D">D</choice>
<choice value="E">E</choice>
<choice value="F">F</choice>
<default>D</default>
</input>
</fieldset>
<row>
<panel>
<event>
<search>
<query>| makeresults
| eval $select$ = "$select$"</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="list.drilldown">none</option>
<option name="refresh.display">progressbar</option>
</event>
</panel>
</row>
</form>

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Something like this?

<form>
  <label>Multi Link Input</label>
  <fieldset submitButton="false">
    <input type="radio" token="select_link" searchWhenChanged="true">
      <label>Select Link List</label>
      <choice value="1">1</choice>
      <choice value="2">2</choice>
      <change>
        <condition value="2">
          <set token="show_2">true</set>
          <unset token="show_1"></unset>
        </condition>
        <condition value="1">
          <set token="show_1">true</set>
          <unset token="show_2"></unset>
        </condition>
      </change>
      <default>1</default>
    </input>
    <input type="link" token="select" searchWhenChanged="true" depends="$show_1$">
      <label>1</label>
      <choice value="A">A</choice>
      <choice value="B">B</choice>
      <choice value="C">C</choice>
      <default>A</default>
      <change>
        <set token="select">$value$</set>
      </change>
    </input>
    <input type="link" token="select" searchWhenChanged="true" depends="$show_2$">
      <label>2</label>
      <choice value="D">D</choice>
      <choice value="E">E</choice>
      <choice value="F">F</choice>
      <default>D</default>
      <change>
        <set token="select">$value$</set>
      </change>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults
| eval $select$ = "$select$"</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </table>
    </panel>
  </row>
</form>
0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Updates (ESCU) - New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 3 releases of new content via the Enterprise ...

Thought Leaders are Validating Your Hard Work and Training Rigor

As a Splunk enthusiast and member of the Splunk Community, you are one of thousands who recognize the value of ...

.conf23 Registration is Now Open!

Time to toss the .conf-etti &#x1f389; —  .conf23 registration is open!   Join us in Las Vegas July 17-20 for ...