Splunk Search

Multiselect: value's prefix and suffix not working

ferivas
New Member

Hi Splunk colleagues,

I'm having a problem with multiselect in my dashboards. Here's the code of the multiselect:

<input type="multiselect" token="bap" searchWhenChanged="false">
  <label>BAP</label>
  <fieldForLabel>BAP</fieldForLabel>
  <fieldForValue>BAP</fieldForValue>
  <search base="base">
    <query>| search BAP IN("$form.bap$") | dedup BAP | table BAP</query>
  </search>
  <valuePrefix>"</valuePrefix>
  <valueSuffix>"</valueSuffix>
  <delimiter>,</delimiter>
  <choice value="*">Todos</choice>
  <prefix>(</prefix>
  <suffix>)</suffix>
</input>

The thing is that if I pass information through this token (form.bap) the value's prefix and suffix are not appearing and my searches are returning no results. This is how I look for the information in the token on my searches:

| search BAP IN("$form.bap$") 

And this is how it appears (in this case, the values that I'm selecting are "BI" and "Core"):

| search BAP IN ("BI,Core")

As you can see, no quotes are added in between the two values, therefore no results found. I tried to change the way that I use to look for the information of the token (just with | search $form.bap$ and adding the "BAP IN" part on the prefix) but it's not working either.

If you need more information about this or if the explanation is not as clear as possible, let me know!

Thanks in advance,

Labels (1)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@ferivas

Few questions:
1) from where you are setting token $form.bap$?
2) Is multiselect token bap the same as the token used in the same multiselect search? Can you please share the logic behind this?

3) Did you tried by displaying $form.bap$ value in any other panel? like


$form.bap$


0 Karma

ferivas
New Member

Hi, thanks for your response!

1) Im setting the token just in the multiselect
2) This is for updating the different multiselects that I have with the information that you are selecting in each one of them. In this particular case there's other tokens in there but I deleted them for make the code that I show more clear.
3) Yes, but the problem persists: no quotes and no brackets appearing.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...