I am trying to create a dropdown menu where a user can select a city. I have the following code as the search string but it is not working.
sourcetype="support_csv" location | fields location | dedup location
I have very little experience with Splunk and need a basic how to for dropdown menus haha!
what about this:
sourcetype="support_csv" |stats count by location|fields - count
and then in your Field for Label and Field for Value, use location
Like this:
sourcetype="support_csv" |stats count by location|sort 0 - count | fields - count
This puts the most popular locations at the top.
Good to know! Thank you!
Try the following for Dynamic Options of the dropdown:
sourcetype="support_csv" location=*
| dedup location
| table location
what about this:
sourcetype="support_csv" |stats count by location|fields - count
and then in your Field for Label and Field for Value, use location
That worked perfectly! Thank you so much!!