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
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!

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

How to find the worst searches in your Splunk environment and how to fix them

Everyone knows Splunk is a powerful platform for running searches and doing data analytics. Your ...

Share Your Feedback: On Admin Config Service (ACS)!

Help Us Build a Better Admin Config Service Experience (ACS)   We Want Your Feedback on Admin Config Service ...