Dashboards & Visualizations

dynamic drilldown on table value

simona2121
Path Finder

I have a table Fruits. Under Fruits table I have value "apple" "grape" "kiwi"

I want to redirect the page to a new page depending on which row the user has clicked. So, if i click on "kiwi" (from the table values), I should be redirected to "abc" page, if i click on "apple" (from the table values), I should be redirected to "xyz" page. I have been trying to use the drilldown tag. but it only redirects to one single page irrespective of the value of the table clicked by user.

Tags (1)
0 Karma
1 Solution

sundareshr
Legend

Try this updated answer

 <panel>
   <table>
     <search>
       <query>basequery</query>
       <earliest>$field1.earliest$</earliest>
       <latest>$field1.latest$</latest>
     </search>
     <option name="wrap">true</option>
     <option name="rowNumbers">false</option>
     <option name="dataOverlayMode">none</option>
     <option name="drilldown">row</option>
     <option name="count">10</option>
     <drilldown>
        <condition match="match(`click.value2`=&quot;kiwi&quot;)">
        <set token="abc">$click.value2$</set>
        <link>
            //pathOfNewPage?form.abc=$valueOfFieldname(eg:kiwi, apple)$
        </link>
        </condition>
     </drilldown> 
   </table>
 </panel>

View solution in original post

0 Karma

sundareshr
Legend

Try this updated answer

 <panel>
   <table>
     <search>
       <query>basequery</query>
       <earliest>$field1.earliest$</earliest>
       <latest>$field1.latest$</latest>
     </search>
     <option name="wrap">true</option>
     <option name="rowNumbers">false</option>
     <option name="dataOverlayMode">none</option>
     <option name="drilldown">row</option>
     <option name="count">10</option>
     <drilldown>
        <condition match="match(`click.value2`=&quot;kiwi&quot;)">
        <set token="abc">$click.value2$</set>
        <link>
            //pathOfNewPage?form.abc=$valueOfFieldname(eg:kiwi, apple)$
        </link>
        </condition>
     </drilldown> 
   </table>
 </panel>
0 Karma

simona2121
Path Finder

Doesnt work. 😞

0 Karma

sundareshr
Legend

Please share your dashboard code (xml)

0 Karma

simona2121
Path Finder

Fruits

<input type="time" token="field1">
  <label></label>
  <default>
    <earliest>0</earliest>
    <latest></latest>
  </default>
</input>


<panel>
  <table>
    <search>
      <query>basequery</query>
      <earliest>$field1.earliest$</earliest>
      <latest>$field1.latest$</latest>
    </search>
    <option name="wrap">true</option>
    <option name="rowNumbers">false</option>
    <option name="dataOverlayMode">none</option>
    <option name="drilldown">cell</option>
    <option name="count">10</option>

      <set token="abc">$click.value2$</set>
        <link>
     //pathOfNewPage?form.abc=$valueOfFieldname(eg:kiwi, apple)$
    </link>
    </drilldown> 
  </table>
</panel>
0 Karma

sundareshr
Legend

Try updated answer

0 Karma

simona2121
Path Finder

I did. It gives me a error at this line

.. and which is why i am unable o save the xml query at all.

0 Karma

simona2121
Path Finder

Extra content at the end of the document

0 Karma

sundareshr
Legend

Try this working run-anywhere sample.

<dashboard>
  <label>Test Dashboard</label>
  <row>
    <panel>
      <table>
        <title>$x$</title>
        <search>
          <query>index=_internal | stats count by sourcetype</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">row</option>
        <option name="refresh.display">preview</option>
        <drilldown>
          <condition match="match('click.value', &quot;splunk&quot;)">
            <link>http://www.splunk.com</link>
          </condition>
          <condition field="*">
            <set token="x">did not match</set>
          </condition>
        </drilldown>
      </table>
    </panel>
  </row>
</dashboard>
0 Karma

simona2121
Path Finder

Omg!! Thank you so much
It works flawlessly

0 Karma

sundareshr
Legend

Do you want to change the path of the link based on user selection or just a value in the querystring?

0 Karma

simona2121
Path Finder

want to change it Based on the value of row the user clicks on.

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!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

Data Management Digest – May 2026

Welcome to the May 2026 edition of Data Management Digest!   As your trusted partner in data innovation, the ...