Splunk Search

How to create a table cell conditional drilldown on click

vikas_gopal
Builder

Hi Experts ,

I am preparing a very simple dashboard this will have 2 input text box elements and one table which has 2 columns host and sourcetype . I want to fill sourcetype in texbox1 and if user click on host cell then host value should fill in text box 2 . I used condition but it not working . Here is my current code

<form>
  <label>Test Dashboard</label>
  <fieldset submitButton="false">
    <input type="text" token="a">
      <label>host</label>
    </input>
    <input type="text" token="b">
      <label>sourcetype</label>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <title>test</title>
        <search>
          <query>index=_internal | dedup host,sourcetype|table host,sourcetype</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="count">10</option>
        <option name="drilldown">cell</option>
        <drilldown>
          <condition field="host">
            <set token="a">$row.host$</set>
            <unset token="b"></unset>
          </condition>
          <condition field="sourcetype">
            <set token="b">$row.sourcetype$</set>
            <unset token="a"></unset>
          </condition>
        </drilldown>
      </table>
    </panel>
  </row>
</form>
0 Karma
1 Solution

vnravikumar
Champion

Hi

Try with form.a and form.b

<form>
   <label>Test Dashboard</label>
   <fieldset submitButton="false">
     <input type="text" token="a">
       <label>host</label>
     </input>
     <input type="text" token="b">
       <label>sourcetype</label>
     </input>
   </fieldset>
   <row>
     <panel>
       <table>
         <title>test</title>
         <search>
           <query>index=_internal | dedup host,sourcetype|table host,sourcetype</query>
           <earliest>-15m</earliest>
           <latest>now</latest>
         </search>
         <option name="count">10</option>
         <option name="drilldown">cell</option>
         <drilldown>
           <condition field="host">
             <set token="form.a">$row.host$</set>
             <unset token="form.b"></unset>
           </condition>
           <condition field="sourcetype">
             <set token="form.b">$row.sourcetype$</set>
             <unset token="form.a"></unset>
           </condition>
         </drilldown>
       </table>
     </panel>
   </row>
 </form>

View solution in original post

0 Karma

vnravikumar
Champion

Hi

Try with form.a and form.b

<form>
   <label>Test Dashboard</label>
   <fieldset submitButton="false">
     <input type="text" token="a">
       <label>host</label>
     </input>
     <input type="text" token="b">
       <label>sourcetype</label>
     </input>
   </fieldset>
   <row>
     <panel>
       <table>
         <title>test</title>
         <search>
           <query>index=_internal | dedup host,sourcetype|table host,sourcetype</query>
           <earliest>-15m</earliest>
           <latest>now</latest>
         </search>
         <option name="count">10</option>
         <option name="drilldown">cell</option>
         <drilldown>
           <condition field="host">
             <set token="form.a">$row.host$</set>
             <unset token="form.b"></unset>
           </condition>
           <condition field="sourcetype">
             <set token="form.b">$row.sourcetype$</set>
             <unset token="form.a"></unset>
           </condition>
         </drilldown>
       </table>
     </panel>
   </row>
 </form>
0 Karma

vikas_gopal
Builder

Wow such a silly mistake from my side , i would have catch this easily . BTW thank you Kumar.

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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...