Splunk Dev

Can you set token with multiple values?

Thenmozhi1
Engager

Hi,

I am trying to change/control many multi-select dropdowns by one Master_multi-select dropdown value/checks.

So I am trying to use more than one value in the set-token tag. But it is not working, if I give 2 values in the Set-token tag. then it will get merge but if I give a single value then it is working fine.

I tried multiple ways like double quotes, single quotes, and many symbols, but I could not find the solution.

 

Please find the below example and help me to find a solution.

 

<set token="form.Filter1"> "rejected" , "new" </set>

out put will be like below. 

Thenmozhi1_0-1633281655240.png

 

But the expectation is like below

Thenmozhi1_1-1633281655325.png

 

 

Example in multiselect code:-

<input type="dropdown" token="MasterFilter_Token">
<label>MasterFilter</label>
...,

<change>
<condition>

<set token="form.Filter1"> "new", "rejected", "closed" </set>

...,

</condition>
</change>

...,

 

@token1 @dashboard @splunk 

Labels (4)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Rather than set try using eval and split to return a multi-value field

<eval token="form.Filter1">split("rejected,new",",")</eval>

 

View solution in original post

Thenmozhi1
Engager

Hi,

It is working fine.

Thanks a lot for your valuable support and help !!! 😊 

ITWhisperer
SplunkTrust
SplunkTrust

Rather than set try using eval and split to return a multi-value field

<eval token="form.Filter1">split("rejected,new",",")</eval>

 

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 ...