Dashboards & Visualizations

dashboard input - if single value available - choose it

matansocher
Contributor

Hi,

I have a dashboard that in it there is a multiselect input.
sometimes the multiselect search results only 1 result.
can I automatically choose it when there is only 1 option?

Thanks.

0 Karma

niketn
Legend

@matansocher, can you provide sample code for Multiselect Input?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

matansocher
Contributor

yes, I have had that All Option, but the users wanted to see if they have only 1 value, to select it automatically

0 Karma

cmerriman
Super Champion

have you tried setting a default static option to All with value as * that way the multiselect automatically defaults to All options, so when there is only one option, it chooses all options? I'm not sure how your search is setup, but you might need to put the multiselect search as a subsearch in your query for that to work as a filter, in case * in the panel's search query could grab other results.

0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...