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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...