Splunk Search

How to make the URL hyperlink which is in the fields value of the table (Dashboard Studio - JSON format)

SureshkumarD
Explorer

Hi Team,

I have generated dynamic URLs using the lookup and add it in the field value of the table. Now I need to make those dynamic URLs as a hyperlink so that we don't want to manually copy and paste the URL in the browser every time. 

SureshkumarD_0-1716401067750.png

I modified the source code as below, but it is working. Please assist on this. Thank you.

"visualizations": {
        "viz_abc123": {
            "type""splunk.table",
            "options": {
                "count"5000,
                "dataOverlayMode""none",
                "drilldown": {
                    "condition": {
                        "field""URL",
                        "link""$row.URL|n$"
                    }
                },
                "backgroundColor""#FAF9F6",
                "tableFormat": {
                    "rowBackgroundColors""> table | seriesByIndex(0) | pick(tableAltRowBackgroundColorsByBackgroundColor)",
                    "headerBackgroundColor""> backgroundColor | setColorChannel(tableHeaderBackgroundColorConfig)",
                    "rowColors""> rowBackgroundColors | maxContrast(tableRowColorMaxContrast)",
                    "headerColor""> headerBackgroundColor | maxContrast(tableRowColorMaxContrast)"
                },
                "showInternalFields"false,
                "columnFormat": {
                    "Duration(Secs)": {
                        "data""> table | seriesByName(\"Duration(Secs)\") | formatByType(Duration_Secs_ColumnFormatEditorConfig)",
                        "rowColors""> table | seriesByName(\"Duration(Secs)\") | rangeValue(Duration_Secs_RowColorsEditorConfig)"
                    },
                    "Duration(Mins)": {
                        "data""> table | seriesByName(\"Duration(Mins)\") | formatByType(Duration_Mins_ColumnFormatEditorConfig)",
                        "rowColors""> table | seriesByName(\"Duration(Mins)\") | rangeValue(Duration_Mins_RowColorsEditorConfig)"
                    }
                }
            },
0 Karma

danspav
SplunkTrust
SplunkTrust

Hi @SureshkumarD,

To get the drilldown working from a field in a table you can use the drilldown options:

"eventHandlers": [
   {
      "type": "drilldown.customUrl",
       "options": {
          "url": "$row.URL.value|n$",
          "newTab": true
      }
   }
]

 

You can set that up in the UI with the following:

danspav_0-1716530100503.png

 

0 Karma

SureshkumarD
Explorer

Hi @danspav ,

I replied on Friday that the hyperlink is not working by providing the source code and screenshots. Could you please look into it and assist? Thank you.

0 Karma

SureshkumarD
Explorer

Hi @danspav ,

I added the event handlers and updated $row.URL.value$ in the link to custom url as per your ask, but still the url is not reflecting as hyperlink. Here is the source code and I shared the screenshot of the table below. Thank you.

 

 "visualizations": {
        "viz_qFxEKJ3l": {
            "type""splunk.table",
            "options": {
                "count"5000,
                "dataOverlayMode""none",
                "drilldown""none",
                "backgroundColor""#FAF9F6",
                "tableFormat": {
                    "rowBackgroundColors""> table | seriesByIndex(0) | pick(tableAltRowBackgroundColorsByBackgroundColor)",
                    "headerBackgroundColor""> backgroundColor | setColorChannel(tableHeaderBackgroundColorConfig)",
                    "rowColors""> rowBackgroundColors | maxContrast(tableRowColorMaxContrast)",
                    "headerColor""> headerBackgroundColor | maxContrast(tableRowColorMaxContrast)"
                },
                "eventHandlers": [
                    {
                        "type""drilldown.customUrl",
                        "options": {
                            "url""$row.URL.value|n$",
                            "newTab"true
                        }
                    }
                ],
 
 
SureshkumarD_0-1716580237979.png

 

SureshkumarD_1-1716580666781.png

 

0 Karma

danspav
SplunkTrust
SplunkTrust

Hi @SureshkumarD,

I tried out your code - the rows aren't showing up as links because of the table formatting / row color setting.

Remove this line from your code:

    "rowColors": "> rowBackgroundColors | maxContrast(tableRowColorMaxContrast)",

 

That is causing the "link" effect on the clickable rows to disappear.

Here's the full viz code:

"visualizations": {
        "viz_qFxEKJ3l": {
            "type": "splunk.table",
            "options": {
                "count": 5000,
                "dataOverlayMode": "none",
                "drilldown": "none",
                "backgroundColor": "#FAF9F6",
                "tableFormat": {
                    "rowBackgroundColors": "> table | seriesByIndex(0) | pick(tableAltRowBackgroundColorsByBackgroundColor)",
                    "headerBackgroundColor": "> backgroundColor | setColorChannel(tableHeaderBackgroundColorConfig)",
                    "headerColor": "> headerBackgroundColor | maxContrast(tableRowColorMaxContrast)"
                },
                "eventHandlers": [
                    {
                        "type": "drilldown.customUrl",
                        "options": {
                            "url": "$row.URL.value|n$",
                            "newTab": true
                        }
                    }
                ],

 Give that a go on your dashboard.

0 Karma

SureshkumarD
Explorer

Hi @danspav ,

Thank you for your response. I made the changes and when I clicked on the hyperlink, it is not redirecting to the correct dynamically generated external URL 'https://abc12345.apps.dynatrace.com/ui/apps/dynatrace.classic.distributed.traces/ui/services/SERVICE...'. Here are the screenshots and code below. Please assist on this.

SureshkumarD_0-1717173033019.png

 

SureshkumarD_1-1717175440878.png

 

"visualizations": {
        "viz_aBCd123": {
            "type""splunk.table",
            "options": {
                "count"5000,
                "dataOverlayMode""none",
                "drilldown""none",
                "backgroundColor""#FAF9F6",
                "tableFormat": {
                    "rowBackgroundColors""> table | seriesByIndex(0) | pick(tableAltRowBackgroundColorsByBackgroundColor)",
                    "headerBackgroundColor""> backgroundColor | setColorChannel(tableHeaderBackgroundColorConfig)",
                    "headerColor""> headerBackgroundColor | maxContrast(tableRowColorMaxContrast)"
                },
                "eventHandlers": [
                    {
                        "type""drilldown.customUrl",
                        "options": {
                            "url""$row.URL.value|n$",
                            "newTab"true
                        }
                    }
                ],
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...