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!

Leveraging Detections from the Splunk Threat Research Team & Cisco Talos

  Now On Demand  Stay ahead of today’s evolving threats with the combined power of the Splunk Threat Research ...

New in Splunk Observability Cloud: Automated Archiving for Unused Metrics

Automated Archival is a new capability within Metrics Management; which is a robust usage & cost optimization ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...