Dashboards & Visualizations

How to drilldown in Dashboard Studio using the value of a hidden table column

edgarrity
Path Finder

We have a dashboard created with the XML Dashboard Classic editor which presents a table of alerts and allows the user to open a second dashboard to see the details.  The parent dashboard uses the drill-down feature to link to the child dashboard.  The value of a hidden column in the row the user clicked on is passed to the child dashboard in the URL string.  We are porting this to Dashboard Studio and need to know how to link using the value from a hidden column?  It seems that the column must be visible for the drilldown link to work.

Labels (2)
0 Karma
1 Solution

renjith_nair
Legend

Here is a  run anywhere example.

One of the columns is defined as _hidden so that it wont be displayed in the table. _fields are considered to be internal fields and there is an option to hide them. The second panel displays the value of the taken while clicking on each row

{
    "visualizations": {
        "viz_oIMuXymL": {
            "type": "splunk.table",
            "dataSources": {
                "primary": "ds_yjf97sDt"
            },
            "options": {
                "showInternalFields": false
            },
            "eventHandlers": [
                {
                    "type": "drilldown.setToken",
                    "options": {
                        "tokens": [
                            {
                                "token": "HiddenValue",
                                "key": "row._hidden.value"
                            }
                        ]
                    }
                }
            ],
            "title": ""
        },
        "viz_gyqHTdIv": {
            "type": "splunk.markdown",
            "options": {
                "markdown": "**Value of Clicked row : $HiddenValue$**",
                "backgroundColor": "#ffffff",
                "fontFamily": "Times New Roman",
                "fontSize": "extraLarge"
            }
        }
    },
    "dataSources": {
        "ds_yjf97sDt": {
            "type": "ds.search",
            "options": {
                "query": "| makeresults count=5\n| streamstats count\n| eval value=\"Value\".count\n| eval _hidden=\"Hidden\".count\n| fields - count",
                "queryParameters": {
                    "earliest": "-24h@h",
                    "latest": "now"
                }
            },
            "name": "Search_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_oIMuXymL",
                "type": "block",
                "position": {
                    "x": 0,
                    "y": 0,
                    "w": 1440,
                    "h": 400
                }
            },
            {
                "item": "viz_gyqHTdIv",
                "type": "block",
                "position": {
                    "x": 0,
                    "y": 400,
                    "w": 1440,
                    "h": 400
                }
            }
        ],
        "globalInputs": []
    },
    "description": "",
    "title": "drilldown_studio"
}

 

 

---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

renjith_nair
Legend

Here is a  run anywhere example.

One of the columns is defined as _hidden so that it wont be displayed in the table. _fields are considered to be internal fields and there is an option to hide them. The second panel displays the value of the taken while clicking on each row

{
    "visualizations": {
        "viz_oIMuXymL": {
            "type": "splunk.table",
            "dataSources": {
                "primary": "ds_yjf97sDt"
            },
            "options": {
                "showInternalFields": false
            },
            "eventHandlers": [
                {
                    "type": "drilldown.setToken",
                    "options": {
                        "tokens": [
                            {
                                "token": "HiddenValue",
                                "key": "row._hidden.value"
                            }
                        ]
                    }
                }
            ],
            "title": ""
        },
        "viz_gyqHTdIv": {
            "type": "splunk.markdown",
            "options": {
                "markdown": "**Value of Clicked row : $HiddenValue$**",
                "backgroundColor": "#ffffff",
                "fontFamily": "Times New Roman",
                "fontSize": "extraLarge"
            }
        }
    },
    "dataSources": {
        "ds_yjf97sDt": {
            "type": "ds.search",
            "options": {
                "query": "| makeresults count=5\n| streamstats count\n| eval value=\"Value\".count\n| eval _hidden=\"Hidden\".count\n| fields - count",
                "queryParameters": {
                    "earliest": "-24h@h",
                    "latest": "now"
                }
            },
            "name": "Search_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_oIMuXymL",
                "type": "block",
                "position": {
                    "x": 0,
                    "y": 0,
                    "w": 1440,
                    "h": 400
                }
            },
            {
                "item": "viz_gyqHTdIv",
                "type": "block",
                "position": {
                    "x": 0,
                    "y": 400,
                    "w": 1440,
                    "h": 400
                }
            }
        ],
        "globalInputs": []
    },
    "description": "",
    "title": "drilldown_studio"
}

 

 

---
What goes around comes around. If it helps, hit it with Karma 🙂

edgarrity
Path Finder

Thanks.  That worked.

0 Karma
Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...