Dashboards & Visualizations

how to populate static dropdown based on another dropdown

Digvijay
Path Finder

Hi Team,

I have a dashboard in which I have 2 dropdowns. 

1 SELECT API :

- PARTY INTERACTION

-TICKET MANAGAMENT

 

2.SELECT OPERATION

-this second dropdown needs to be populated based on first one

a. If API = PARTY INTERACTION 

then values here -

<choice value="*">Alle</choice>
<choice value="LISTTROUBLETICKETS">LISTTROUBLETICKETS</choice>
<choice value="RETRIEVETROUBLETICKET">RETRIEVETROUBLETICKET</choice>
<choice value="CREATETICKET">CREATETICKET</choice>
<choice value="UPDATETICKET">UPDATETICKET</choice>
<choice value="RETRIEVETICKETTHEME">RETRIEVETICKETTHEME</choice>
<choice value="GETINBOXDETAILSFORUSER">GETINBOXDETAILSFORUSER</choice>

b.If API=TICKET MANAGAMENT

<choice value="*">Alle</choice>
<choice value="LISTPARTYINTERACTIONS">LISTPARTYINTERACTIONS</choice>
<choice value="RETRIEVEPARTYINTERACTION">RETRIEVEPARTYINTERACTION</choice>

Please help me to do this .

Digvijay_0-1629888600529.pngDigvijay_1-1629888632019.png

 

Labels (1)
0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

@Digvijay 

You should try something like this.

<fieldset submitButton="false">
    <input type="dropdown" token="tkn_API">
      <label>API</label>
      <choice value="PARTY INTERACTION">PARTY INTERACTION</choice>
      <choice value="TICKET MANAGAMENT">TICKET MANAGAMENT</choice>
    </input>
    <input type="dropdown" token="tkn_ OPERATION">
      <label>OPERATION</label>
      <fieldForLabel>OPERATION</fieldForLabel>
      <fieldForValue>OPERATION</fieldForValue>
      <search>
        <query>| makeresults | eval API="PARTY INTERACTION",OPERATION="LISTTROUBLETICKETS,RETRIEVETROUBLETICKE,CREATETICKET,UPDATETICKET,RETRIEVETICKETTHEME,GETINBOXDETAILSFORUSER
" | append [| makeresults | eval API="TICKET MANAGAMENT",OPERATION="LISTPARTYINTERACTIONS,RETRIEVEPARTYINTERACTION"] | eval OPERATION=split(OPERATION,",")
|mvexpand OPERATION| table API OPERATION  | search API="$tkn_API$"</query>
      </search>
    </input>
  </fieldset>

 

Thanks
KV
▄︻̷̿┻̿═━一   ?

If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.

View solution in original post

Digvijay
Path Finder

Thanks @kamlesh_vaghela  it worked for me.

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@Digvijay 

You should try something like this.

<fieldset submitButton="false">
    <input type="dropdown" token="tkn_API">
      <label>API</label>
      <choice value="PARTY INTERACTION">PARTY INTERACTION</choice>
      <choice value="TICKET MANAGAMENT">TICKET MANAGAMENT</choice>
    </input>
    <input type="dropdown" token="tkn_ OPERATION">
      <label>OPERATION</label>
      <fieldForLabel>OPERATION</fieldForLabel>
      <fieldForValue>OPERATION</fieldForValue>
      <search>
        <query>| makeresults | eval API="PARTY INTERACTION",OPERATION="LISTTROUBLETICKETS,RETRIEVETROUBLETICKE,CREATETICKET,UPDATETICKET,RETRIEVETICKETTHEME,GETINBOXDETAILSFORUSER
" | append [| makeresults | eval API="TICKET MANAGAMENT",OPERATION="LISTPARTYINTERACTIONS,RETRIEVEPARTYINTERACTION"] | eval OPERATION=split(OPERATION,",")
|mvexpand OPERATION| table API OPERATION  | search API="$tkn_API$"</query>
      </search>
    </input>
  </fieldset>

 

Thanks
KV
▄︻̷̿┻̿═━一   ?

If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.

prabu300698
Observer

I need to do same thing in splunk studio dashboard with json editor.  How to achieve this in studio dashboard.

0 Karma
Get Updates on the Splunk Community!

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...

Getting Started with Splunk Artificial Intelligence, Insights for Nonprofits, and ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...