Hello.
here is a way to have it functional.
<init>
<set token="srch_form_length">0</set>
</init>
<fieldset autoRun="true" submitButton="false">
<input type="text" token="srch_form">
<label>Search</label>
<default></default>
<change>
<eval token="srch_form_length">len($srch_form$)</eval>
</change>
</input>
<input type="dropdown" token="srch_dropdown">
<label>Select dropdown</label>
<default>option1</default>
<choice value="option1">option1</choice>
<choice value="option2">option2</choice>
<change>
<condition match=" $srch_form_length$ == 0 ">
<set token="temp_token">srch_form length is 0, dropdown value = $srch_dropdown$</set>
</condition>
<condition match=" $srch_form_length$ > 0 ">
<set token="temp_token">srch_form length is greater than 0, dropdown value = $srch_dropdown$</set>
</condition>
<condition match=" 1 > 0">
<eval token="empty">if(len($srch_form|s$) = 0,"Zero","Non Zero")</eval>
</condition>
</change>
</input>
</fieldset>
Basically, the length of the first input is computed when it changes, and is set to 0 at init, and this value is used in the match condition.
I could not fix the "len($srch_form$) == 0" case, but I suspect it has to do with this:
http://docs.splunk.com/Documentation/Splunk/7.1.1/Viz/tokens
section Token filters
... View more