All Apps and Add-ons

How to make a multi-select token with dynamic options that defaults to selecting all?

augustallen4
Explorer

I have a dashboard which will dynamically return values in a separate multiselect token based on user input to an initial token. However, I would like the multiselect token to default to having all options selected with the ability to uncheck any option and remove them from results.

The functionality I am looking for is nearly identical to the "Fields to use for predicting" in the Machine Learning Toolkit but I cannot figure out how to see the source code in that app. The only difference is that I would like to default to having all values selected.

0 Karma

pramit46
Contributor

How about appending 'All' to your dynamic resultset, through the query and make it default value?

<Your search resultset>|append [|makeresults |eval columnname="All", columnvalue="*"]

then make this All as default value. you can do it from ui as well as from xml.

0 Karma

augustallen4
Explorer

I'm looking to default to having all the values selected and then a user can remove any values they do not want. If there's a value for ALL then you have to deselect it and then click dozens of other values.

The functionality I'm looking for is more like a "select all" not just making "all" an option. If I could figure out how they did it in the machine learning toolkit that would be perfect.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...