Dashboards & Visualizations

How to get multiple tokens from a single dropdown input on a form?

johnglass
Explorer

I've got a CSV file with four columns, something similar to below:

dc_index,dc_name,dc_snow,dc_int,dc_int_speed
dc_anchorage,Anchorage,APG ANC *,41544000
dc_albany,Albany,APG ALB *,31544000
dc_albuquerque,Albuquerque,APG ALQ *,153072000
dc_altoona,Altoona,APG ALT *,31544000
dc_atlanta,Atlanta,APG ATL *,103072000
dc_billings,Billings,APG BIL *,111536000

I'm looking for a way to capture the values of all columns when a single row is selected. For example, say on the form I have a dropdown for "dc_name". When Anchorage is selected, I need it as well as the other three columns to be captured in tokens and passed on to charts within the form.

I've got it working with multiple dropdowns on the form. When you choose the first option it does an inputlookup and the other inputs are populated with the values of the row, however I don't want 4 separate dropdowns on the form. Is there a way to accomplish this? This is what I have today, but my preference would be to have just two dropdowns; a time picker and DC Name.

<form>
  <label>DC View</label>
  <fieldset submitButton="false" autoRun="true">
    <input type="time" searchWhenChanged="true">
      <label>Choose time range:</label>
      <default>
        <earliestTime>-24h@h</earliestTime>
        <latestTime>now</latestTime>
      </default>
    </input>
    <input type="dropdown" searchWhenChanged="true" token="dc_index">
      <label>Choose DC:</label>
      <selectFirstChoice>false</selectFirstChoice>
      <populatingSearch earliest="$earliest$" latest="$latest$" fieldForLabel="dc_name" fieldForValue="dc_index">
        <![CDATA[ | inputlookup dc_info.csv | table dc_index dc_name]]>
      </populatingSearch>
      <change>
        <unset token="form.dc_snow"></unset>
        <unset token="dc_snow"></unset>
      </change>
    </input>
    <input type="dropdown" searchWhenChanged="true" token="dc_snow">
      <label>DC SNOW ID:</label>
      <selectFirstChoice>true</selectFirstChoice>
      <populatingSearch earliest="0" latest="now" fieldForLabel="dc_snow" fieldForValue="dc_snow">
        <![CDATA[ | inputlookup dc_info.csv | search dc_index="$dc_index$" | table dc_snow]]>
      </populatingSearch>
    </input>
  </fieldset>
Tags (3)

HiroshiSatoh
Champion

Although not tried・・・
For example, What about with this?

<populatingSearch earliest="$earliest$" latest="$latest$" fieldForLabel="dc_name" fieldForValue="dc_index">
         <![CDATA[ | inputlookup dc_info.csv | table dc_index dc_name]]>

<populatingSearch earliest="$earliest$" latest="$latest$" fieldForLabel="dc_name" fieldForValue="swhere">
         <![CDATA[ | inputlookup dc_info.csv | eval swhere="dc_index="+dc_index+" dc_snow="+dc_snow]]>
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!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...