Dashboards & Visualizations

How to pass 2 values in multiselect dropdown as value1 OR value2, not value 1 AND value2?

wangkevin1029
Communicator

Hi, SPlunkers,

 

I have a multiselect dropdown field in my splunk dashboard.

 

 I want to select 2 options from it,  I noticed it's previewed as "value1 "  "value2",   since there is no result returned. I assumed it worked as value1 AND values,  but I expected it works as value1  OR  value2.

how to configure it? 

 

Kevin

Labels (1)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@wangkevin1029 

You can set values multi-select dropdown by setting up the default value ` <default>A,C</default>` .  Like,

 

<input type="multiselect" token="field1">
      <label>field1</label>
      <choice value="A">A</choice>
      <choice value="B">B</choice>
      <choice value="C">C</choice>
      <choice value="D">D</choice>
      <default>A,C</default>
    </input>

 

In case the default value is dynamic then you should set those values into a token and use it with the default tag.

 

Kindly share sample XML and the expected behavior of the dashboard.

I hope this will help you.

Thanks
KV
If any of my replies help you to solve the problem Or gain knowledge, an upvote would be appreciated.

 

0 Karma

wangkevin1029
Communicator

Kamlesh,

 

I have 5 different values, a,b,c,d,e,  I can't put all combinations as values here,  besides, combination will not only of 2 values, might be 3 values.

so, I wish I could select 2 values,  not  as A and B,  but  as A or B,  similarly , if I select A,B,C,  IT should be used as A or B or C.

 

thx.

 

Kevin

0 Karma

Software-Simian
Path Finder

Hi,

 

have you tried a delimiter?

 

<delimiter> OR </delimiter> 

wangkevin1029
Communicator

Software-SImian,  

 

Big  thanks,  <delimiter> OR </delimiter>   works.

 

 

Kevin

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@wangkevin1029 

Can you please share your sample XML code and a few expected use cases from that?

KV

 

0 Karma

wangkevin1029
Communicator

Kamlesh,

 

the following is my droplist xml code:

 

when I selected  1.Classification  and 2.Segmentation,  I expected search result is  Phase = 1.Classification  OR  2.Segmentation,  but search result is  NONE  for Phase = 1.Classification  AND  2.Segmentation

 

<input id="phaseid" type="multiselect" token="Phase" searchWhenChanged="true">

      <label>Phase Selection</label>

      <choice value="1.Classification">1.Classification</choice>

      <choice value="2.Segmentation">2.Segmentation</choice>

      <choice value="3.Features Setup">3.Features Setup</choice>

      <choice value="4.Call Structure">4.Call Structure</choice>

      <choice value="5.Targets and Treatments">5.Targets</choice>

      <valuePrefix>"</valuePrefix>

      <valueSuffix>"</valueSuffix>

      <default>*,5.Targets and Treatments</default>

      <initialValue>5.Targets and Treatments</initialValue>

    </input>

 

 

Kevin

0 Karma
Get Updates on the Splunk Community!

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...