Splunk Enterprise

How to add dependable/dynamic radio buttons?

Ashwini008
Builder

Hello,

I want to add dependable Radio button Functionality for below example.

When i click on 'TR DEPT' in Landscape View  then Filter radio buttons should be displayed with 'ALL' option being selected by default. When i select 'TR Failed' option then Filter radio buttons should not be displayed and it should be hidden.

Ashwini008_1-1635848562991.png

 

Could you please help me with code?

Thank you

Tags (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
    <input type="radio" token="lv">
      <label>Landscape View</label>
      <choice value="TRDEPT">TR DEPT</choice>
      <choice value="TRFAILED">TR FAILED</choice>
      <change>
        <condition value="TRDEPT">
          <set token="showfilter"></set>
          <set token="form.filter"></set>
        </condition>
        <condition value="TRFAILED">
          <unset token="showfilter"></unset>
        </condition>
      </change>
    </input>
    <input type="radio" token="filter" depends="$showfilter$">
      <label>Filter</label>
      <choice value="All">All</choice>
      <choice value="PRNO">PR NO</choice>
      <choice value="PRSTATUS">PR STATUS</choice>
      <default>All</default>
    </input>

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
    <input type="radio" token="lv">
      <label>Landscape View</label>
      <choice value="TRDEPT">TR DEPT</choice>
      <choice value="TRFAILED">TR FAILED</choice>
      <change>
        <condition value="TRDEPT">
          <set token="showfilter"></set>
          <set token="form.filter"></set>
        </condition>
        <condition value="TRFAILED">
          <unset token="showfilter"></unset>
        </condition>
      </change>
    </input>
    <input type="radio" token="filter" depends="$showfilter$">
      <label>Filter</label>
      <choice value="All">All</choice>
      <choice value="PRNO">PR NO</choice>
      <choice value="PRSTATUS">PR STATUS</choice>
      <default>All</default>
    </input>

Ashwini008
Builder

@ITWhisperer Thanks for the response.

When clicked on TR DEPT radio button ,'ALL' choice value is not default selected. Even if it is set to default value and initial value is true

Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Can you share you dashboard XML?

0 Karma

Ashwini008
Builder

@ITWhisperer I have used the same code which you have shared . I just added your code in new dashboard. Default is not selected for 'ALL'

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Which release of splunk are you using?

0 Karma

Ashwini008
Builder

Splunk Version 7.0.0

0 Karma

Ashwini008
Builder

This is working fine in 8.0.1 version of splunk. Thank You

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...