All Apps and Add-ons

Pass a user variable to dashboard drilldown

ahogbin
Communicator

Hello,

Apologies if this has been asked before but searching did not yield any results.

Is it possible to pass a variable (for example from a radiobutton) into an underlying drilldown on a form.

The selection option

action_name
action_setting
Select form to apply for drilldown)
False


user_details
Summary


user_details_ST
Timings

<module name="ConvertToIntention">
  <param name="intention">
    <param name="arg">
      <param name="action">
        <param name="fillOnEmpty">True</param>
        <param name="value">$target$</param>
      </param>
    </param>
    <param name="name">stringreplace</param>
  </param>
  <param name="settingToConvert">action_setting</param>

The drilldown component is.....




/app/BluCoat/$action$?form.LAN_ID=$row.LAN_ID$



If I pass the variable to a search it appears correctly (based on the chosen option) but when trying to pass to the view path I get the following error

Invalid view name requested: "$action$". View names may only contain alphanumeric characters.

Any help or suggestions greatly appreciated

Tags (1)

ahogbin
Communicator

Thank you so much.. makes a lot more sense and a whole lot simpler as well.
:)

0 Karma

ahogbin
Communicator

Thank you so much.. makes a lot more sense and a whole lot simpler as well.
:)

0 Karma

sideview
SplunkTrust
SplunkTrust

If you go into the Sideview Utils app in the Splunk UI, it contains a lot of documentation filled with working examples. The short answer here is that you're best off using the Sideview Radio module instead of Splunk's StaticRadio module, that you should use the Sideview Redirector module instead of SimpleDrilldown, use Search instead of HiddenSearch, and that you should stop using intentions for anything at all.

1) Radio module instead of StaticRadio. In the docs go to "Module Documentation > Form element modules > The Radio Module"

It would look like this:

<module name="Radio">
  <param name="name">action</param>
  <param name="label">Select form to apply for drilldown)</param>
  <param name="staticRadios">
    <list>
    <param name="value">user_details</param>
    <param name="label">Summary</param>
  </list>
  <list>
    <param name="value">user_details_ST</param>
    <param name="label">Timings</param>
  </list>
  </param>

I've dropped the "_setting" convention, such that you'll just put $action$ directly into the Search module.

2) Search module instead of HiddenSearch.
The most important docs in Sideview Utils are lined up in a sequence that you can walk through by clicking "next page". Page 3 in this sequence is very important. The whole concept of "intentions" goes away and you'll just use $action$ in a Search module.

3) Intentions. Sideview Utils offers simple techniques to just plug dynamic tokens in pretty much anywhere. You no longer need the extra confusion of "intentions". Never use the "ConvertToIntention" module again.

4) Redirector instead of SimpleDrilldown.
It looks like Splunk's SimpleDrilldown cannot do $foo$-replacement the way you're trying to do it. To be honest I'm not sure how SimpleDrilldown works because the Redirector module makes it obsolete. But a Redirector to do this would look like:

<module name="Redirector">
  <param name="url">/app/BluCoat/$action$</param>
  <param name="arg.form.LAN_ID">$row.LAN_ID$</param>
</module>

Or this would also work but it runs a very slight risk of hitting escaping issues with weird characters.

<module name="Redirector">
  <param name="url">/app/BluCoat/$action$?form.LAN_ID=$row.LAN_ID$</param>
</module>

And within Sideview Utils there are various docs and examples about linking that show you all the features of the Redirector module.

As one final comment, looking at the $row.LAN_ID$ token you've got in there... If I'm correct in guessing that you're trying to reference a drilldown token from a Sideview Table module, you'll want $row.fields.LAN_ID$ instead.

0 Karma

ahogbin
Communicator

Thank you so much.. makes a lot more sense and a whole lot simpler as well.
:)

0 Karma

ahogbin
Communicator

Yes. I have installed sideview utils(latest version) and have already used in a couple of other dashboards - mainly for timerange options.

New to Splunk and XML so still finding my way around but loving what it can do.

Cheers,

Alastair

0 Karma

sideview
SplunkTrust
SplunkTrust

You tagged the question sideview, but you're not using any of the Sideview modules that would make this easier. Are you open to an answer that uses Sideview modules?

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...