Getting Data In

Form with a multi-value text box that will OR every input values

harish_ka
Communicator

How to search multiple values in a text box, that should return results for all the input values.
For Ex, i have a textbox named Num in dashboard, now i can search only 1 input value,
How can i search multiple values, so that i can enter like 10,12,33 , which returns all 3 input results.
The textbox should accept the values like (Num=10 OR Num=12 OR Num=33)

Tags (1)

gjones_splunk
Splunk Employee
Splunk Employee

Hi there,

Bit late in answering (but in case anyone has the same question) I had a bit of help from a colleague on this and it works a treat. Use this xml in a dashboard (against index=_internal) to get an idea of how it works.

Text Input Multi-value Filter

<input type="time" token="TimePicker">
  <label>Time Picker</label>
  <default>
    <earliest>-60m@m</earliest>
    <latest>now</latest>
  </default>
</input>
<input type="text" token="Text_Input">
  <label>Sourcetype text filter with "," separator. It also uses the rex command in the search so you don't have to worry about spaces.</label>
  <prefix>"</prefix>
  <suffix>"</suffix>
</input>


<panel>
  <title>Example of events dedup'd by sourcetype</title>
  <table>
    <search>
      <query>index=_internal  

[ makeresults
| eval sourcetype=$Text_Input$
| makemv tokenizer="([^,]+),?" sourcetype
| mvexpand sourcetype
|rex field=sourcetype mode=sed "s/\s+//g" ]
| dedup sourcetype
| table _time host source sourcetype
$TimePicker.earliest$
$TimePicker.latest$

10
none
progressbar



Sourcetypes to filter on.



index=_internal
| stats values(sourcetype)
$TimePicker.earliest$
$TimePicker.latest$

none

0 Karma

sundareshr
Legend
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...