Dashboards & Visualizations

How to create a list of all the values clicked on from a result set configured for dynamic drilldown?

swajapey
Engager

So, I have a result set which has been configured for dynamic drilldown. All I want to do is, once I select a element in the result set, it should open a new table with that value and all my subsequent clicks on the original result set must create a table.

Basically, it should create a list of all the elements I clicked from the original search result.

Urgent !!! please help

jeffland
SplunkTrust
SplunkTrust

By default, you can't add things to a token, you can only set it. How would you ever clear a token if each click in your table added something to it?

You can of course do this with custom javascript. You need to give your table an id, and in js on the click event of that table add the clicked value to the token. Should look something like

var table = mvc.Components.get("tableId"); // Get table by id given in Simple XML
var tokens = mvc.Components.get("default"); // Get default token model
table.on("click", function(e) {
    if (e.field !== undefined) {
        e.preventDefault(); // Prevent default drilldown behavior
        var oldValue = tokens.get("yourToken");
        tokens.set("yourToken", oldValue + " " + e.data["click.value2"]); // Add new values to token
    }
});

I would also recommend adding a button somewhere to reset the token to empty.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...