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!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...