Splunk Search

How to customize a drilldown so users can only click on the field name in a table, not the sparkline or percentage?

dbcase
Motivator

Hi,

I have a table with 3 fields in it

MSO (a name field)
Trend (a Sparkline)
Percentage (numeric)

When a user clicks on the MSO field, the drilldown and resulting line chart works great!

But when a user clicks on Trend or Percentage, the drilldown "works" (meaning it creates a panel), but the resulting line chart errors out as the query is trying to search on a trendline or a percentage instead of the MSO field. Is there anyway to limit the user so they can only click on the MSO field? Or..... If they click on any other field in the row, convert the token to the MSO name?

0 Karma
1 Solution

sundareshr
Legend

You can do a conditional token. Try this

<drilldown>
<condition field="trend">
 <unset token="tablevalue"></unset>
</condition>
<condition field="percent">
 <unset token="tablevalue"></unset>
</condition>
<condition field="*">
 <set token="tablevalue">$click.value2$</set>
</condition>
</drilldown>

View solution in original post

0 Karma

sundareshr
Legend

You can do a conditional token. Try this

<drilldown>
<condition field="trend">
 <unset token="tablevalue"></unset>
</condition>
<condition field="percent">
 <unset token="tablevalue"></unset>
</condition>
<condition field="*">
 <set token="tablevalue">$click.value2$</set>
</condition>
</drilldown>
0 Karma

dbcase
Motivator

Now that is very slick!!! Worked like a charm!!!! Thanks Sundareshr!!!

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...