Splunk Search

How to add values dynamically from a search to a drop-down input?

Path Finder


I have something like this for a drop-down in a Splunk dashboard:

<input type="dropdown" token="trouID" searchWhenChanged="true">
  <choice value="">All</choice>
  <choice value="1243bd9c9206">Aeroplane</choice>
  <choice value="4b10fbec">tractor</choice>
  <choice value="6cf817f5d">car</choice>
  <choice value="14a4f0">skate App</choice>

and every time a new value appears from a search, I have to manually add it. Is there a way in which new values can be added dynamically to the drop-down?

example of search:

 index=host....... |stats values (trouID)


Tags (3)
0 Karma

Revered Legend

Try this

 <input type="dropdown" token="trouID" searchWhenChanged="true">
  <choice value="*">All</choice>
          index=host....... |stats count by trouID | table trouID
0 Karma


You can use a search to define the choices for a dropdown. See here for the how


0 Karma
Get Updates on the Splunk Community!

Observability Highlights | January 2023 Newsletter

 January 2023New Product Releases Splunk Network Explorer for Infrastructure MonitoringSplunk unveils Network ...

Security Highlights | January 2023 Newsletter

January 2023 Splunk Security Essentials (SSE) 3.7.0 ReleaseThe free Splunk Security Essentials (SSE) 3.7.0 app ...

Platform Highlights | January 2023 Newsletter

 January 2023Peace on Earth and Peace of Mind With Business ResilienceAll organizations can start the new year ...