Other Usage

Make just one column clickable in splunk dashboard studio

Poojitha
Communicator

Hi All, 

Is there a way in splunk dashboard studio just I make one column clickable  in table displayed? 

I have a table visualisation  in dashboard studio. I want just one column value to be clickable. So, that on click of that another table is displayed . ( show / hide). 

Please let me know how we can make just value in one column clickable ? Can we ?

Regards,
PNV


Tags (1)
0 Karma

marnall
Motivator

If I understand correctly, you would like a dashboard to have a table where clicking on any column except one does nothing, and then clicking on the one special column will cause another table to be displayed?

If so, it is possible to do this by adding an Interaction and setting a token to "name" (getting the column name), then setting a requirement in the search of the other table so that the token must equal that name value. Under the Visibility settings of the other table, check the box that says "When data is unavailable, hide element".

More on this method: https://www.splunk.com/en_us/blog/tips-and-tricks/dashboard-studio-how-to-configure-show-hide-and-to...

 

And here is example JSON code for a dashboard where you need to click the "source" column to make the second table appear:

{
    "visualizations": {
        "viz_m5IbYYDW": {
            "type": "splunk.table",
            "dataSources": {
                "primary": "ds_ePMHur2X"
            },
            "eventHandlers": [
                {
                    "type": "drilldown.setToken",
                    "options": {
                        "tokens": [
                            {
                                "token": "test",
                                "key": "name"
                            }
                        ]
                    }
                }
            ],
            "title": "$test$"
        },
        "viz_ppdmDf4r": {
            "type": "splunk.table",
            "dataSources": {
                "primary": "ds_iMzJA85U_ds_ePMHur2X"
            },
            "eventHandlers": [
                {
                    "type": "drilldown.setToken",
                    "options": {
                        "tokens": [
                            {
                                "token": "test",
                                "key": "name"
                            }
                        ]
                    }
                }
            ],
            "title": "$test$",
            "hideWhenNoData": true
        }
    },
    "dataSources": {
        "ds_ePMHur2X": {
            "type": "ds.search",
            "options": {
                "query": "index=*\n| head 10\n| table _time host source sourcetype ",
                "queryParameters": {
                    "earliest": "-24h@h",
                    "latest": "now"
                }
            },
            "name": "Search_1"
        },
        "ds_iMzJA85U_ds_ePMHur2X": {
            "type": "ds.search",
            "options": {
                "query": "index=*\n| head 10\n| table _time host source sourcetype \n| head limit=100  ($test|s$ = \"source\" )",
                "queryParameters": {
                    "earliest": "-24h@h",
                    "latest": "now"
                }
            },
            "name": "Search_1 copy 1"
        }
    },
    "defaults": {
        "dataSources": {
            "ds.search": {
                "options": {
                    "queryParameters": {
                        "latest": "$global_time.latest$",
                        "earliest": "$global_time.earliest$"
                    }
                }
            }
        }
    },
    "inputs": {},
    "layout": {
        "type": "grid",
        "options": {
            "width": 1440,
            "height": 960
        },
        "structure": [
            {
                "item": "viz_m5IbYYDW",
                "type": "block",
                "position": {
                    "x": 0,
                    "y": 0,
                    "w": 720,
                    "h": 400
                }
            },
            {
                "item": "viz_ppdmDf4r",
                "type": "block",
                "position": {
                    "x": 720,
                    "y": 0,
                    "w": 720,
                    "h": 400
                }
            }
        ],
        "globalInputs": []
    },
    "description": "",
    "title": "Make another table visible by clicking on a column"
}
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...