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!

New Year, New Changes for Splunk Certifications

As we embrace a new year, we’re making a small but important update to the Splunk Certification ...

[Puzzles] Solve, Learn, Repeat: Unmerging HTML Tables

[Puzzles] Solve, Learn, Repeat: Unmerging HTML TablesFor a previous puzzle, I needed some sample data, and ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...