Dashboards & Visualizations

Drop Down issue

msachdeva3
Explorer

I'm trying to create a cascading dropdown, i.e. when selecting one field, relevant for others should populate.

I'm able to do so, but:

I want to have an ALL option for the second drop down as well, which shall have limited values, for example:

D1    D2
bc    abcd134,abcx343...
ax    laxcd345, paxcd345....

I want to see all options in D2 based on the value selected in D1 and it should equate to relevant values for D1 selected like

if bc is selected abcd134,abcx343... should be equal to ALL.

Thanks

Mohit Sachdeva

0 Karma

sbbadri
Motivator

<form>
<label>testddsplunk</label>
<fieldset submitButton="false">
<input type="dropdown" token="d1">
<label>D1:</label>
<choice value="bc">bc</choice>
<choice value="ax">ax</choice>
<choice value="">ALL</choice>
<default>*</default>
<initialValue>*</initialValue>
</input>
<input type="dropdown" token="d2">
<label>d2</label>
<fieldForLabel>d2</fieldForLabel>
<fieldForValue>d2</fieldForValue>
<search>
<query>| makeresults | eval d="abcd134;abcx343;laxcd345;paxcd345" | eval d2=split(d,";") | mvexpand d2 | search d2=*$d1$* | table d2</query>
<earliest>0</earliest>
<latest></latest>
</search>
<choice value="
">ALL</choice>
<default>*</default>
<initialValue>*</initialValue>
</input>
</fieldset>
</form>

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

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

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...