Dashboards & Visualizations

How to change xml dropdown to a checkbox?

benjiepr
New Member

I inherited a form and now the developers what it changed from a drop down menu to a check-box so that they can select multiple resources to search. How can i do this current xml is below:

A prototype of a simplified version of the search form with radio buttons.
dropdownchoice1 dropdownchoice2 dropdownchoice3 dropdownchoice4 dropdownchoice5 dropdownchoice6 dropdownchoice7 -24h@h now
index = idx_cat $host$ $Search$ Search results true 20
Tags (3)
0 Karma

ngatchasandra
Builder

If you want to select multiple resources, you need to create a checkbox input (not a radio input) and configure it if you are in splunk web (this configuration is developed in splunk-Viz manual), otherwise if you want to modify directly in your source code, write the scripted input like follow instead your input type radio :

<input type="checkbox" token="Sourcetype" searchWhenChanged="true">
      <choice value="*">All</choice>
      <populatingSearch fieldForLabel="Host" fieldForValue="Host">index=idx_cat |stats count by   Sourcetype</populatingSearch>
      <prefix>(</prefix>
      <suffix>)</suffix>
      <valuePrefix>Sourcetype="</valuePrefix>
      <valueSuffix>"</valueSuffix>
      <delimiter>OR</delimiter>
    </input> 

Thus, with this, you are going to select multiple resources.

0 Karma

benjiepr
New Member

Splunk 5.0.5

0 Karma

somesoni2
Revered Legend

What version of Splunk are you using?

0 Karma
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...