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!

Monitoring Postgres with OpenTelemetry

Behind every business-critical application, you’ll find databases. These behind-the-scenes stores power ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...

Splunk Edge Processor | Popular Use Cases to Get Started with Edge Processor

Splunk Edge Processor offers more efficient, flexible data transformation – helping you reduce noise, control ...