Knowledge Management

help required on lookup

deepikasounda
New Member

Hi,
I used the below to lookup for a query from a lookup file/table and execute it.

Lookup file - search_queries.csv with Name and Search has two columns.
[where search has the query that has to be selected upon selecting the corresponding Name]

<form>
1.   <label>Run Search from Lookup</label>
2.   <fieldset submitButton="false">
3.     <input type="time" token="tokTime" searchWhenChanged="true">
4.       <label>Select Time</label>
5.       <default>
6.         <earliest>-24h@h</earliest>
7.         <latest>now</latest>
8.       </default>
9.     </input>
10.   </fieldset>
11.   <row>
12.     <panel>
13.       <title>Search Based on Lookup</title>
14.       <input type="dropdown" token="tokSearchQuery" searchWhenChanged="true">
15.         <label>Select Search Query (from lookup)</label>
16.         <fieldForLabel>Name</fieldForLabel>
17.         <fieldForValue>Search</fieldForValue>
18.         <search>
19.           <query>| inputlookup search_queries.csv | table Name Search</query>
20.         </search>
21.       </input>
22.       <chart>
23.         <search>
24.           <query>$tokSearchQuery$</query>
25.           <earliest>$tokTime.earliest$</earliest>
26.           <latest>$tokTime.latest$</latest>
27.         </search>
28.         <option name="charting.chart.showDataLabels">minmax</option>
29.         <option name="charting.chart.stackMode">stacked</option>
30.         <option name="refresh.display">progressbar</option>
31.       </chart>
32.     </panel>
33.   </row>
34. </form>

Now my requirement is in my lookup file there are going to be three columns - Name,SubName and Search.
[for the match Name and SubName the corresponding Search has to be executed]

Kindly help me with this.

Your response at the earliest will be appreciated.

Tags (1)
0 Karma

deepikasounda
New Member

Can someone help please

0 Karma

FrankVl
Ultra Champion

Concatenate the name and subname columns into a single column you then use for the dropdown label?

0 Karma

deepikasounda
New Member

Hi,there are lot more varaitions for it.
So doing that will not be possible.

Could you help me without concatenating the columns please

0 Karma

FrankVl
Ultra Champion

Well, then you could try adding another dropdown input that contains the names and then use that token to parametrize the dropdown query that pulls up the subname (and search). I'm not 100% sure though whether that is possible (on dropdown depending on the other) and don't have time at the moment to experiment myself. So just give that a try (or wait for someone else to contribute to this discussion).

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

(re)Introducing the Splunk Community Champions + 2026 – 2027 Splunk MVPs ...

This program exists as a channel to empower and recognize Splunk advocates and help supercharge initiatives to ...

Introducing the 2026 - 2027 SplunkTrust cohort!

The goal of the SplunkTrust™ membership has historically been to acknowledge and recognize those who go above ...

Pro Tips for .conf26: How to Prep Like a Splunk Veteran

There’s no shortage of incredible content lined up for .conf26 in Denver, from deep-dive technical sessions ...