Dashboards & Visualizations

How can I make a token optional, so Dashboard Autorun will run even when the text input is blank?

sillingworth
Path Finder

I have a text input that sets a token which is used in my panels, as a manual filter the user can input. By default I want this to be blank so that no results are filtered out. However, if I do this the dashboard won't autorun, it'll stay on "Search is waiting for input...". If you put "&form.token_name=" in the URL it works, but I want the dashboard to autorun by default with no value in the filter token.

Tags (2)
0 Karma

jodyfsu
Path Finder

Set the token as "*" and it will still run and return results.

0 Karma

sillingworth
Path Finder

Yeah, I know I can do that, but I'd really like it to work when left blank. I just think it looks nicer and more intuitive - I don't want users wondering why it hasn't worked when they haven't put anything in the filter box.

0 Karma

DalJeanis
SplunkTrust
SplunkTrust

@sillingworth - any other method is going to be much more complicated. For instance, you could have a second token, the REAL search token, and preset that. Then, on change of your input token, you could update the value in your actual search token.

However, be warned that if you want to do any validation on the values input by the user, that you need to be careful to avoid a race condition (token 1 sets token 2 which sets token 1 forever).

0 Karma

sillingworth
Path Finder

Hmm, that's worth considering.... thanks 🙂

@Splunk - just give us an input option to allow blanks please!

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