Dashboards & Visualizations

How to set the value of depandant dropdown to "all" when any of the value selceted in the first dropdown?

anooshac
Communicator

Hi all,

I have 2 dropdowns. The first one is manually filled values and the second one is automatically generates using the value selected in the first dropdown. When i select any value from the first dropdown and further select the value from the 2nd dropdown , this works fine. But after these selection if i select any value from the first dropdown the 2nd dropdown value will not set to "all" instead it is using the same value selected during the beginning. I explored and made the necessary changes but i am not getting what is missing here. Can anyone help me in this?

Labels (3)
Tags (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Try this

<set token="form.file">*</set>

or this

<set token="form.file">All</set>

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Can you share the code of what you have tried?

0 Karma

anooshac
Communicator

<input type="dropdown" token="Tok_Group">
<label>Group</label>
<choice value="A">Group1</choice>
<choice value="B">Group2</choice>
<change>

<condition>
<set token="file">*</set>
</condition>
</change>
</input>
<input type="dropdown" token="file" searchWhenChanged="true" depends="$Tok_Group$">
<label>Select File</label>
<fieldForLabel>filename</fieldForLabel>
<fieldForValue>filename</fieldForValue>
<search>
<query>|search filename=$Tok_Group$_*| dedup filename | table filename </query>
</search>
<default>*</default>
<choice value="*">All</choice>
</input>

 

This is the code i am using. But it is not re setting the 2nd value to "All"

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try this

<set token="form.file">*</set>

or this

<set token="form.file">All</set>
0 Karma

anooshac
Communicator

Thank you so much.It is working.

0 Karma
Get Updates on the Splunk Community!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

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

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...