Dashboards & Visualizations

How to pass a token with multiple values to multiselect input as initial values

philippbloch
Loves-to-Learn Lots

Hello there,

I'm trying to fill a multiselect input with a initial value based on a token. The token is based on a lookup search.

<form>
  <label>dashboard</label>
  <search>
    <query>
           | inputlookup lookup.csv
    </query>
    <earliest>-24h</earliest>
    <latest>now</latest>
    <done>
      <set token="tok_lookup">$result.column$</set>
    </done>
  </search>
  <fieldset submitButton="false">
    <input type="multiselect" token="tok_multiselect" searchWhenChanged="false">
      <label>Multi-Select</label>
      <delimiter>,</delimiter>
      <fieldForLabel>column</fieldForLabel>
      <fieldForValue>column</fieldForValue>
      <search>
        <query>| loadjob savedsearch="admin:app:multiselect_list"</query>
        <earliest>-2h@h</earliest>
        <latest>now</latest>
      </search>
      <initialValue>$tok_lookup$</initialValue>
    </input>
  </fieldset>

  ...

 </form>

The inputlookup of lookup.csv does return a single column with multiple rows if run in a seperate search:

column
-----------
value1
value2
value3

value1, value2, value3 should show up as a seperate initial values in the multiselect input. Currently the values do not show up at all. - If I use the token as default, only the first value "value1" is populated to the multiselect field.

Thanks a lot for your help.
Regards,
Philipp

Labels (2)
0 Karma

philippbloch
Loves-to-Learn Lots

I got some new additional information spare: I modified the lookup with mvcombine to have the result in a single row comma-separated:

| mvcombine delim="," field | nomv field

I checked the format how the initial value of the multiselect input needs to be defined:

<initialValue>value1,value2,value3</initialValue>

But passing the token in this style doesn't work as well. The initial value shows up as one huge value. Not in separate values.

If I define the initial value manually by putting in the values by hand (for example in the order of value1,value2,value3) it works perfectly.

Any ideas? Anyone?

0 Karma

vnravikumar
Champion

Hi

$result.<fieldname>$ -   The token accesses the value from the first row of returned results.

You can check here:
https://docs.splunk.com/Documentation/Splunk/8.0.3/Viz/EventHandlerReference

0 Karma

philippbloch
Loves-to-Learn Lots

Hi! Thanks for the response. 🙂

I got it. Any idea if it will work if I combine the results to a single row?

For example: value1,value2,value3

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!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...