Splunk Dev

Load another panel when one row in a table is selected

macadminrohit
Contributor

Hi,

Currently i have a search which actually generally a stats for the number of application installed on a server. The list of servers is coming from the inputlookup command. This will give the number of apps installed on each host.

index=main sourcetype="Script:InstalledApps" [|inputlookup servers | rename Servers as host ]
| search DisplayName = Microsoft* | stats dc(DisplayName) by host

Now i want to list all the apps when i select a row in the above stats table. So basically i want to load another panel below the stats table which will just give the list of installed apps for the host selected.

Tags (1)
0 Karma
1 Solution

ralzate
Explorer

Hello

You can use the drilldown functionality.
You have to activate drilldown on the first table. And for the specific host column set up a token used by the second table.

You can even use "depends" in order to hide the panel when no row was selected.

<panel>
  <table>
    <title>main table</title>
    <search>
      <query>index=main sourcetype="Script:InstalledApps" [|inputlookup servers | rename Servers as host ] | search DisplayName = Microsoft* | stats dc(DisplayName) by host</query>
    </search>
    <option name="count">10</option>
    <option name="drilldown">cell</option>
    <option name="wrap">true</option>
    <drilldown>
      <condition field="host">
        <set token="hostName">$click.value2$</set>
      </condition>
      <condition field="*">
        <unset token="hostName"></unset>
      </condition>
    </drilldown>
  </table>
</panel>

<panel depends="$hostName$">
    <table>
    <title>Detail table</title>
    <search>
      <query>index=main sourcetype="Script:InstalledApps" host=$hostName$ ...</query>
    </search>
    <option name="count">10</option>
    <option name="drilldown">none</option>
    <option name="wrap">true</option>
  </table>
</panel>

Regards
Régis

View solution in original post

ralzate
Explorer

Hello

You can use the drilldown functionality.
You have to activate drilldown on the first table. And for the specific host column set up a token used by the second table.

You can even use "depends" in order to hide the panel when no row was selected.

<panel>
  <table>
    <title>main table</title>
    <search>
      <query>index=main sourcetype="Script:InstalledApps" [|inputlookup servers | rename Servers as host ] | search DisplayName = Microsoft* | stats dc(DisplayName) by host</query>
    </search>
    <option name="count">10</option>
    <option name="drilldown">cell</option>
    <option name="wrap">true</option>
    <drilldown>
      <condition field="host">
        <set token="hostName">$click.value2$</set>
      </condition>
      <condition field="*">
        <unset token="hostName"></unset>
      </condition>
    </drilldown>
  </table>
</panel>

<panel depends="$hostName$">
    <table>
    <title>Detail table</title>
    <search>
      <query>index=main sourcetype="Script:InstalledApps" host=$hostName$ ...</query>
    </search>
    <option name="count">10</option>
    <option name="drilldown">none</option>
    <option name="wrap">true</option>
  </table>
</panel>

Regards
Régis

chaker
Contributor

Does this help?

http://docs.splunk.com/Documentation/Splunk/7.0.3/Viz/tokens

Access tokens to show or hide user interface components

You can use token values to conditionally show or hide user interface components. The following elements contain the attributes depends and rejects. Use the and elements to set the token values that these attributes consume.

<row>
<panel>
<chart>
<event>
<html>
<map>
<single>
<table>
<input>

For example, show the element only when the showChart token has been set.

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!

Monitoring AI Agents with Splunk Observability Cloud

Let’s say I’m running a travel planning AI app in production. A user asks for three concise hotel options in ...

[Puzzles] Solve, Learn, Repeat: Tiling

This puzzle (first published here) is based on finding groups of tessellated tiles (inspired by floor tiles I ...

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...