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
Champion

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
Champion

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
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!

Review:





Or Learn More in Our Blog >>