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!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...