My input tag looks like this
</input>
<input type="multiselect" token="fruit_name">
<label>Fruit name</label>
<choice value="*">All</choice>
<default>*</default>
<initialValue>*</initialValue>
<fieldForLabel>fruit_name</fieldForLabel>
<fieldForValue>fruit_name</fieldForValue>
<search>
<query>index=splunk query | mvexpand fruit_name
</query>
</search>
<delimiter> </delimiter>
<change>
<eval token="fruit">
<expression>if(isnull($fruit_name$), "//*", $fruit_name$)</expression>
<default>*</default>
</eval>
</change>
</input>
I use `fruit` later in a panel in the XML dashboard. The issue is if user doesn’t select anything from the drop down, `fruit_name` still holds value '*' but the panel which uses `fruit` just shows a message `Search is waiting for input...`. How can I make sure that when user doesn’t select anything, along with `fruit_name` `fruit` also holds the default value which is '*'. Please help.
Try it this way
<eval token="fruit">if(isnull($fruit_name$), "//*", $fruit_name$)</eval>
Try it this way
<eval token="fruit">if(isnull($fruit_name$), "//*", $fruit_name$)</eval>