Getting Data In

Dropdown List

Jasmine
Path Finder

Based on the value from one dropdownlist i am hiding other drop downlist.(based on condition doing unset the token of 2nd ddl).. Although the dropdownlist got hidden, still value getting passed if we already chosen some value. Initial value set to be 'All'

Labels (1)
Tags (1)
0 Karma

woodcock
Esteemed Legend

Read the docs or forms and simplexml.  You can just "unset" the control's form and value manually to force it to reset to it's default value.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Tokens will persist even if the drop down list is no longer visible - you could try unsetting the token when the input is hidden. You have already been shown how to do this.

0 Karma

Jasmine
Path Finder

i have tried as below. but didnt work.

code for ddl1

<input type="dropdown" token="ddl1" searchWhenChanged="true">
      <label>Type</label>
      <choice value="*">All</choice>
       <change>
         <condition value="Manager">
             <set token="show_address">true</set>
        </condition>
        <condition value="All">
             <set token="show_address">true</set>
        </condition>
        <condition value="Admin">
             <unset token="show_address"></unset>
        </condition>
       </change>

<initialValue>*</initialValue>
      <default>*</default>

ddl2 is as below:

<input type="dropdown" token="ddl2" depends="$show_address$" searchWhenChanged="true">

value getting passed when ddl2 is hidden and when ddl  is with "Admin"

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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