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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...