Dashboards & Visualizations

Passing two values in condition based on selection of multiselect values

smanojkumar
Contributor

Hi There!
   I would like to pass two values based on the selection of inputs in multiselect drill down,
   Assume I'm having Multiselect options as v1, v2, v3, v4
   Based on the selection

Eg. If v1 and v2 were selected, I would like to pass "value1" "value 2" in "OR" condition to a token of a base search.

Thanks in Advance!

Labels (1)
0 Karma

seemanshu
Path Finder

Hi @smanojkumar ,

You could use the "IN" operator for this scenario.

Let's assume the field name is "field1", so you could construct the multi-select input like following,

seemanshu_0-1699339715507.png

This would have the output of the selected values like following,

field1 IN("value1", "value2"),

which is same as,

field1="value1" OR field1="value2"

If you find the solution helpful, kindly upvote.

Thanks

0 Karma

smanojkumar
Contributor

Hi @seemanshu ,
   Thanks for your response!
   

Can you help me here with using condition, there are some existing query which is defined for single value input radio button, I would like to use the same

<condition match="$tok1$==&quot;v1&quot;>
<set token="value1">true</set>
<condition match==&quot;v2&quot;>
<set token="value2">true</set>

but this is not working , if i use 2 values

<condition match="$tok1$==&quot;v1&quot;  AND $tok1$==&quot;v2&quot; >
<set token="value1">value1 OR value2</set>

Thanks in Advance!

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...