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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...