Dashboards & Visualizations

how to pass static dropdown value to a second static dropdown

guillecasco
Path Finder

i tried to do this with querys to populate each dropdown but i´m getting some errors. I just want to have this manually like this:

Dropdown 1
A
B
C

dropdown 2
123
234
345
456

if i choose A i just want to show on other dropdown: 123 and 234 (for example)
if i choose B i just want to show 345 and 123
if i choose C 123,234 and456...and so on

is there a way to do this manually? there are not so many values and i don´t mind adding them . Is there some kind of "eval" with dropdowns?

Thanks

Tags (2)
0 Karma
1 Solution

sundareshr
Legend

@guillecasco,

An easier approach would be use a query to populate your second dropdown. The query for the second dropdown can use token value from the first drop down to filter appropriately.

http://docs.splunk.com/Documentation/Splunk/6.4.1/Viz/tokens#Define_tokens_for_form_inputs

View solution in original post

somesoni2
Revered Legend

Try this

1) Create a lookup table, say dropdownvalues.csv, with two columns field1 field2 **choose good names if possible for both lookup and columns
dropdownvalues.csv

 field1,field2
A,123
A,234
B,345
B,123
C,123.
C,234
C,456

2) Dropdown 1, use this query (assuming token name is field1)

| inputlookup dropdownvalues.csv | stats count by field1 | table field1

3) Dropdown 2, use this query

| inputlookup dropdownvalues.csv | search field1="$field1$"| stats count by field2 | table field2

guillecasco
Path Finder

thanks man, it was easier to get the values on the second drop box dynamically from a search.
Will implement you idea when i can´t do that.

0 Karma

sundareshr
Legend

@guillecasco,

An easier approach would be use a query to populate your second dropdown. The query for the second dropdown can use token value from the first drop down to filter appropriately.

http://docs.splunk.com/Documentation/Splunk/6.4.1/Viz/tokens#Define_tokens_for_form_inputs

guillecasco
Path Finder

thanks man!

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...