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!

3 Ways to Make OpenTelemetry Even Better

My role as an Observability Specialist at Splunk provides me with the opportunity to work with customers of ...

What's New in Splunk Cloud Platform 9.2.2406?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2406 with many ...

Enterprise Security Content Update (ESCU) | New Releases

In August, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...