Dashboards & Visualizations

Populate a drop down from lookup csv in Name-Value pair

nirmalya2006
Path Finder

Hi All

I have a csv which has data in this format

RepoCode, RepoName

I want to populate a drop down which will display the RepoName but the values of the drop down will be the RepoCode based on which the dashboard will display data.
I am unable to figure out how it can be done or rather how to frame the query.

I am trying to use inputlookup like this

| inputlookup repo
| sort RepoName
| table RepoName

But this code will just populate the drop down with RepoName and the same RepoName will be used for dashboard.
How can I get the underlining RepoCode for each of these RepoName from the csv to be used in the dashboard.

Thanks

0 Karma
1 Solution

davebrooking
Contributor

Take a look at the example form in the documentation for Static_and_dynamic_inputs_to_forms. In your case I suspect you would set

<fieldForLabel>RepoName</fieldForLabel>
<fieldForValue>RepoCode</fieldForValue>

Dave

View solution in original post

davebrooking
Contributor

Take a look at the example form in the documentation for Static_and_dynamic_inputs_to_forms. In your case I suspect you would set

<fieldForLabel>RepoName</fieldForLabel>
<fieldForValue>RepoCode</fieldForValue>

Dave

nirmalya2006
Path Finder

Yups.. That worked. Thank you !!!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...