Getting Data In

How to create a drop-down that displays values for the selected inputlookup csv file?

CHINTASH
New Member

So let's says I have 2 lookup fields |inputlookup abc.csv & |inputlookup def.csv

I want to tokenize and create a drop-down label called "lookup file" . Now I should be able to click the drop-down and select the abc.csv and I should be able to see values for only the abc file. Similarly I want another option in drop-down for def.csv, so when I select the def.csv from the drop-down, I should be able to see values for that inputlookup file.

Please help

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Try like this

<form>
  <label>Test</label>
  <fieldset submitButton="false">
    <input type="dropdown" token="lookupname">
      <label>Lookup Name</label>
      <choice value="Fils1.csv">File1</choice>
      <choice value="FIle2.csv">File2</choice>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <search>
          <query>| gentimes start=-1 |  eval "search to run"="|inputlookup $lookupname$" | table search*</query>
          <earliest>-60m@m</earliest>
          <latest>now</latest>
        </search>
        <option name="wrap">true</option>
        <option name="rowNumbers">false</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
        <option name="count">10</option>
      </table>
    </panel>
  </row>
</form>
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 ...