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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...