Dashboards & Visualizations

White spaces in field values when creating dynamic dropdown

shakSplunk
Path Finder

Hi all,

I've setup a dynamic dropdown field in a dashboard through the following configurations:

shakSplunk_0-1623289373152.png

I then use the field value as a input to filter one of the pivot tables on the dashboard (FILTER Artefact is $artefact$ ). However the issue I'm facing is that the Artefact values can sometimes have a whitespace in their values e.g. "foo bar" and this is creating an issue when filtering as it just filters by foo instead of foo bar. 

Any help would be highly appreciated!

Labels (2)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

tokens can be written like

$artefact|s$

where the |s before the trailing $ will ensure the token value is quoted appropriately. 

You can always do "$artefact$" but it's better practice to use |s so that it will be safe if ever processed by Javascript.

See https://docs.splunk.com/Documentation/Splunk/8.2.0/Viz/tokens#Syntax_to_consume_tokens

 

View solution in original post

bowesmana
SplunkTrust
SplunkTrust

tokens can be written like

$artefact|s$

where the |s before the trailing $ will ensure the token value is quoted appropriately. 

You can always do "$artefact$" but it's better practice to use |s so that it will be safe if ever processed by Javascript.

See https://docs.splunk.com/Documentation/Splunk/8.2.0/Viz/tokens#Syntax_to_consume_tokens

 

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...