Dashboards & Visualizations

Dropdown that predicts/populates options based on text as it is entered?

splunk6161
Path Finder

Hi,
I have a drop down panel, when I type text in search box i would see a list that begin with text typed.
Example:
alt text

Thank you

0 Karma

woodcock
Esteemed Legend

This is from my (sadly unaccepted) answer here:
https://answers.splunk.com/answers/526830/drilldown-with-click-values-not-working.html

I did something similar when I needed to search tens-of-thousands of software packages. I used 2 controls instead of one. The unusual control was a RegEx-based pre-filter on the main multi-select control:

<label>Demo for whittling down a HUGE selection list to manageable chunk</label>
<description>This is not the exact answer that you were seeking, but may be a good alternative</description>
<fieldset autorun="false" submitButton="true">
  <input type="text" token="filter_token" searchWhenChanged="false">
    <label>RegEx filter for Wine Dropdown --></label>
    <default>.</default>
  </input>
  <input type="dropdown" token="wine_token" searchWhenChanged="false">
    <label>(<-- filtered) Wine Selector:</label>
    <default>*</default>
    <choice value="*">All</choice>
    <fieldForLabel>wine</fieldForLabel>
    <fieldForValue>wine</fieldForValue>
    <search>
      <query>| inputcsv winelist.csv | regex wine="(?i)$filter_token$" | table wine</query>
      <earliest>-1s</earliest>
      <latest>now</latest>
    </search>
  </input>
</fieldset>

The really nice thing about this is that it very natural and only the geeks who grok RegEx need to know it is RegEx under the hood; the plebes will just type white and it will "just work". They will need to be taught to do red|white and that will be good for 90+% of all users/searches and for those who need more, you get to geek mentor them into RegEx.

niketn
Legend

@splunk6161, default behavior of dropdown is to filter results based of typed text match through out each of the dropdown labels not only at the beginning of label. I think this would only be possible through JavaScript override. Is this dropdown populated through Dynamic Splunk Search query? How many max rows are possible and approx how much time your current search takes in regular search scenario?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Splunk Search APIを使えば調査過程が残せます

   このゲストブログは、JCOM株式会社の情報セキュリティ本部・専任部長である渡辺慎太郎氏によって執筆されました。 Note: This article is published in both Japanese ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...