Dashboards & Visualizations

input type checkbox to use conditonal operators

secure
Path Finder

 

i have a table with values and based on the input checklist selection i want to display the table rows

i have a checkbox option enabled in the panel so that users can select the checkbox
and accordingly table displays the value

greater than 100
between 10 to 100
less than 10

How can i use the conditional operator in the input type
as i try to add the value > or < in the input the search doesn't work in the panel

secure_0-1735822516903.png

 

Labels (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @secure ,

you have to insert the three conditions, something like this:

    <input type="checkbox" token="field1">
      <label>Test</label>
      <choice value="your_field>90">greather than 90</choice>
      <choice value="your_field>=10 AND your_field<=90">between 10 and 90</choice>
      <choice value="your_field<10">less than 10</choice>
      <prefix>(</prefix>
      <suffix>)</suffix>
      <delimiter>  OR </delimiter>
    </input>

You can adapt this example to your use case.

Ciao.

Giuseppe

dural_yyz
Motivator

Your drop down values become literal text replacements inside your SPL powering your dashboard.  You need to account for SPL syntax requirements for your choices and for prefix and suffix like displayed above.  It can take some finesse to get complicated searches to work but yours looks to lean more to the simple side.  Best to trouble shoot by letting the dashboard load/fail, then open panel in a new windows to see what the SPL was published as.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Please share the source of your dashboard or at least a cut down version showing what you are trying to do

0 Karma
Get Updates on the Splunk Community!

Developer Spotlight with William Searle

The Splunk Guy: A Developer’s Path from Web to Cloud William is a Splunk Professional Services Consultant with ...

Major Splunk Upgrade – Prepare your Environment for Splunk 10 Now!

Attention App Developers: Test Your Apps with the Splunk 10.0 Beta and Ensure Compatibility Before the ...

Stay Connected: Your Guide to June Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...