Quantcast
Channel: Latest Questions on Splunk Answers
Viewing all articles
Browse latest Browse all 13053

Build a Search String with an Arbitrary Number of Conditions

$
0
0

I want to build a search string with an arbitrary number of OR conditions testing the value of a single variable. The number of OR conditions will be determined by the number of checked checkboxes on a form.

For example: Given 3 checked checkboxes: RED, WHITE, BLUE, the search string will be:

color=RED OR color=WHITE OR color=BLUE

If I uncheck RED, the search string will be:

color=WHITE or color=BLUE

Can this be achieved with a simple XML dashboard or do I need to go beyond that (e.g. use JavaScript)?

To clarify, the number of checkboxes is not known beforehand -- the checkboxes are created dynamically based on a search result.


Viewing all articles
Browse latest Browse all 13053

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>