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’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

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

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...