Dashboards & Visualizations

how to fulfill a drop-down list automtically

jip31
Motivator

hello

I want to know if its possible to fullfill a drop down list automatically?
I want to retrieve the field SITE in my drop down list

| inputlookup x.csv| lookup x.csv HOSTNAME as host output SITE

another question
when I add a field manually, if there is a space in the field I cant use it
for example, in the static option if I add a name field like "toto - tutu" and I put the same name in the value field I have no results for this field even if the name if correct
I am obliged to do "toto*" in the value field for having results but its not correct because I have to use the exact name
what can I do please??

thanks

Tags (1)
0 Karma
1 Solution

VatsalJagani
SplunkTrust
SplunkTrust

Hi @jip31,

I think these steps might help.

  • Edit your dashboard
  • Add an Input (Drop-down)
  • Edit the input
  • Give token name
  • Scroll down to "Dynamic Options"
  • Paste your search there ( | inputlookup x.csv)
  • Field For Label - Give SITE
  • Field For Value - Give value SITE
  • Apply
  • Save the dashboard

For your second question where you have some value with spaces. You can search that in your search like: | search field=$your_dropdown_token_name|s$
Basically, |s will add quotes on both side as well as if your value itself contents quotes this will escape those. Hence you will be able to search full value.
Hope this helps!!!

View solution in original post

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

Hi @jip31,

I think these steps might help.

  • Edit your dashboard
  • Add an Input (Drop-down)
  • Edit the input
  • Give token name
  • Scroll down to "Dynamic Options"
  • Paste your search there ( | inputlookup x.csv)
  • Field For Label - Give SITE
  • Field For Value - Give value SITE
  • Apply
  • Save the dashboard

For your second question where you have some value with spaces. You can search that in your search like: | search field=$your_dropdown_token_name|s$
Basically, |s will add quotes on both side as well as if your value itself contents quotes this will escape those. Hence you will be able to search full value.
Hope this helps!!!

0 Karma

jip31
Motivator

perfect all is working!

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...