Dashboards & Visualizations

Sending variables to a dashboard

vbumgarn
Path Finder

Is there any way to set a dashboard variable value via the url? It'd be nice to be able to do something like:

https://splunk4/en-US/app/myApp/myDashBoard?client=foo

And have the value of client available in the dashboard code as $client$.

Is there some way to accomplish this now?

Tags (1)

jbp4444
Path Finder

From Nick: "It's one of the significant things being worked on for the next big release"

So is this in 4.2 ??

0 Karma

richprescott
Path Finder

Releases are typically classified as major, minor and change. There are others, but I am guessing that Nick meant major version, which would be 5.0.

0 Karma

sideview
SplunkTrust
SplunkTrust

No Im afraid that we dont have anything like this in 4.1 nor in 4.0.

It's one of the significant things being worked on for the next big release.

If you are all of the following:

a) very familiar with Javascript in general
b) very familiar with Jquery in particular,
c) already in the advanced XML
d) willing to roll up your sleeves even further,

then you can sometimes workaround this limitation by putting a custom application.js file into your app and writing your own Javascript there.

Here's an example where I had a ServerSideInclude module on the page that would serve as a dynamic page title, and I write the value of a 'pageTitle' argument from the URL into that ServerSideInclude element.

$(function() {
    var qsDict = Splunk.util.queryStringToProp(document.location.search);
    if ("pageTitle" in qsDict) {
        $(".DM_pageTitle h1").text(qsDict["pageTitle"])
    }  
})

With some work you could use the same trick to do other things like set the selected state of a pulldown in a SearchSelectLister module.

Lowell
Super Champion

Pretty sure you couldn't do this in 4.0. I'm not sure about 4.1. I think this would be a great feature. +1

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...