Dashboards & Visualizations

How to pass time range values in a drilldown?

sushmitha_mj
Communicator

Hi,

I am having trouble passing a time range value from the main form to the drilldown form . So when I click on each row i want the drill to show the transactions in that time range alone(15 min in this case)

Here is my main form query and drill down link

   <search>
      <query>index=ibd Service_Name=*|timechart span=15m count(Trans)   | eval _earliest = _time | eval _latest = _time + _span</query>
      <earliest>$TimeField.earliest$</earliest>
      <latest>$TimeField.latest$</latest>
    </search>

   <drilldown>
      <link>
        <![CDATA[/app/app_name/form_name?form._earliest=$row._earliest$&form._latest=$row._latest$]]>
        <option name="dataOverlayMode">none</option>
      </link>
    </drilldown>

On the drill down dashboard I have the following:

<input type="time" searchWhenChanged="true" token="TimeField">
  <label></label>
  <default>
    <earliest>$_earliest$</earliest>
     <latest>$_latest$</latest>
    </default>
</input>

To pass the value to the query, I simply used:

      <query>...|search </query>
      <earliest>$TimeField.earliest$</earliest>
      <latest>$TimeField.latest$</latest>

Since this did not work... I tried to pass the time value directly:

      <query>...|search </query>
      <earliest>$_earliest$</earliest>
      <latest>$_latest$</latest>

Both did not work. Can someone tell me what is wrong:

0 Karma
1 Solution

sundareshr
Legend

Try this

*Main Dashboard*

<search>
       <query>index=ibd Service_Name=*| timechart span=15m count(Trans) </query>
       <earliest>$TimeField.earliest$</earliest>
       <latest>$TimeField.latest$</latest>
     </search>
    <drilldown>
       <eval token="e">$click.value$</eval>
       <eval token="le">relative_time($click.value$, "+15m")</eval>
       <link>
         <![CDATA[/app/app_name/form_name?form._earliest=$e$&form._latest=$l$]]>
         <option name="dataOverlayMode">none</option>
       </link>
     </drilldown>

**** On drilldown dashboard****

 <input type="time" searchWhenChanged="true" token="TimeField">
   <label></label>
   <default>
     <earliest>$form._earliest$</earliest>
      <latest>$form._latest$</latest>
     </default>
 </input>

View solution in original post

sundareshr
Legend

Try this

*Main Dashboard*

<search>
       <query>index=ibd Service_Name=*| timechart span=15m count(Trans) </query>
       <earliest>$TimeField.earliest$</earliest>
       <latest>$TimeField.latest$</latest>
     </search>
    <drilldown>
       <eval token="e">$click.value$</eval>
       <eval token="le">relative_time($click.value$, "+15m")</eval>
       <link>
         <![CDATA[/app/app_name/form_name?form._earliest=$e$&form._latest=$l$]]>
         <option name="dataOverlayMode">none</option>
       </link>
     </drilldown>

**** On drilldown dashboard****

 <input type="time" searchWhenChanged="true" token="TimeField">
   <label></label>
   <default>
     <earliest>$form._earliest$</earliest>
      <latest>$form._latest$</latest>
     </default>
 </input>

james_n
Path Finder

hi @sundareshr , Its working fine for last 24 hours or Today, But if i select last 7 days its taking earliest as day starting and latest as day starting to 15 minutes like 00:15:00, Could you help on this.

0 Karma

sushmitha_mj
Communicator

It worked!! Awesome thanks

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!

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 ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...