Dashboards & Visualizations

Enable / disable search bar in dropdown

matstap
Communicator

I have a dashboard with several dropdowns. Some of them have search bars in them and others don't, in what seems to me like a random manner. Is there an option to enable/disable the search bar in a dropdown?

alt text

alt text

0 Karma

niketn
Legend

@matstap, when you use Dynamic Option to populate choices in your Dropdown, it will have search bar. But when you have static options it will not. So one of the option to get both dropdown behavior to be similar, would be to use run anywhere Search to populate static options. Following is the search you would need to add to the first dropdown.

| makeresults
| eval data="GMT,GMT;America/Los Angeles,America/Los Angeles"
| makemv data delim=";"
| mvexpand data
| makemv data delim=","
| eval label=mvindex(data,0),value=mvindex(data,1)
| table label value

PS: I have used separate label and value values in the search so that if they differ, the same search should still work. If they are always the same your query would be simple to have just the values which will be assigned to label and value both.
On the other hand if you want to hide Search text box (which by the way is quite useful when you have your Dynamic Search return a lot of values), then you can use CSS to hide the same. I had answered that in past but no able to find the question. So, in case above does not work and you need CSS override to hide the Search box let us know.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

matstap
Communicator

In my case, the static option (time zone) resulted in a search bar and the dynamic option (State) resulted in no search bar. Anything else I can try?

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Can you post dashboard xml for both the dropdowns?

0 Karma

matstap
Communicator
<input type="dropdown" token="timezone" searchWhenChanged="false">
      <label>Time zone</label>
      <choice value="GMT">GMT</choice>
      <choice value="America/Los Angeles">America/Los Angeles</choice>
      <default>GMT</default>
      <initialValue>GMT</initialValue>
    </input>
    <input type="dropdown" token="state">
      <label>State</label>
      <choice value="&quot;&quot;">Select a State</choice>
      <fieldForLabel>State</fieldForLabel>
      <fieldForValue>State</fieldForValue>
      <search>
        <query>| inputlookup location_psap.csv | dedup State | fields State</query>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </search>
      <default>""</default>
      <initialValue>""</initialValue>
    </input>
0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...