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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...