Dashboards & Visualizations

Dashboard tokens interference with Map tokens

WwihgylWPiNbnXB
Engager

Hi everyone,

I have a inline search panel on a dashboard, that uses a parameter from a drop down input. Let's refer to it as token $A$ for simplicity.
The search panel runs a query involving the map command, using it's own token, which I will refer to as $B$.

index=kewl $A$ | head 1 | fields B |mvexpand B | map [ | dbquery db "select * from mytable where field=$B$" ] 

The dashboard panel does not run, awaiting for the B input forever.
Is there a way to isolate the context for the B token? or a nifty way to force the search to run without it?

Thanks for your help

Tags (3)
0 Karma
1 Solution

woodcock
Esteemed Legend

I believe you need to escape it with more $ like this:

index=kewl $A$ | head 1 | fields B |mvexpand B | map [ | dbquery db "select * from mytable where field=$$B$$" ]

View solution in original post

woodcock
Esteemed Legend

I believe you need to escape it with more $ like this:

index=kewl $A$ | head 1 | fields B |mvexpand B | map [ | dbquery db "select * from mytable where field=$$B$$" ]
Get Updates on the Splunk Community!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...