Dashboards & Visualizations

Modify the clicked field value if clicked field = "x"

lpolo
Motivator

Hi,

I have a drill down table in sideviewutils. It is working without any problem. I need to modified the value of the clicked field if the value is let's say "X".

Example:
clicked_value="$row.fields.ProgramID$"
if clicked_value = "x" then click_value = "b" else clicked_value = $row.fields.ProgramID$;

Is this possible is sideviewutils?

Thanks,
Lp

Tags (1)

sideview
SplunkTrust
SplunkTrust

Sure. You'll want to get to know the ValueSetter modules a little better. In particular the main one "ValueSetter", which has a feature where it can set values conditionally.

Take a read through the ValueSetter docs page within Sideview Utils, under "Module Documentation > The Value Setter Modules > the ValueSetter Module".

<module name="ValueSetter">
    <param name="name">modifiedValue</param>
    <param name="if.$click.value$=x">b</param>
    <param name="default">$row.fields.ProgramID$</param>

    <!-- downstream modules can access either $modifiedValue$ or $row.fields.ProgramID$ etc..  -->
  </module>

and if you want to rewrite one of the existing keys it's as simple as using the same name.

<module name="ValueSetter">
    <param name="name">row.fields.ProgramID</param>
    <param name="if.$click.value$=x">b</param>
    <param name="default">$row.fields.ProgramID$</param>


  </module>

lpolo
Motivator

Thanks,
Lp

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...