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!

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...

Thank You for Celebrating CX Day with Splunk!

Yesterday the entire team at Splunk &#43; Cisco joined the global celebration of CX Day - celebrating our ...