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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...