All Apps and Add-ons

Sideview Utils: How to display the label value based on the radio button option selected?

ahogbin
Communicator

A quick question to a puzzling issue.

I am trying to get the .label value to be displayed depending on the radio button option selected. For whatever reason the value is not appearing and even though I have used exactly the same in the past with expected results this time round I am having no luck.

If I simply pass $environment$ to the HTML then all works fine but if I try to pass $environment.label$ then the value does not get picked up despite it being clearly declared.

  <param name="group">static config</param>
  <param name="name">environment</param>
  <param name="staticRadios">
    <list>
      <param name="value">MMA</param>
      <param name="label">Motor</param>
    </list>
    <list>
      <param name="value">HMA</param>
      <param name="label">Home</param>
    </list>
  </param>

  <module name="HTML" layoutPanel="viewHeader">
                  <param name="html"><![CDATA[
                  Displaying results for <b>$environment.label$</b>
                ]]></param>
                </module>

I have tried various iterations but no joy. The exact same has worked without issue on other dashboards.

Frustrating... and I am sure a simple oversight on my behalf somewhere.

Cheers,

Alastair

sideview
SplunkTrust
SplunkTrust

This is actually caused by a minor bug in the Radio module, in that the module makes no effort to make a $foo.label$ key available for downstream modules. A fix is already in place and it will ship in the next release (3.3.1) .

Sorry I was initially confused because I misread your question reading Pulldown for Radio, and this bug doesn't exist in the Pulldown module.

For completeness, there are 5 modules that share extremely similar conventions and params. Of these the most commonly used and the most extensively documented is "Pulldown". In practice if you get familiar with the Pulldown and the various pages of Pulldown docs and examples, the same conventions and params exist over in the other 4 modules, although these other modules have less verbose docs and fewer explicit examples.

These 5 cousins are Pulldown, CheckboxPulldown, Tabs, Radio and the Checkboxes module. Of these 5, Radio and Checkboxes were both by mistake were given no $foo.label$ feature, and both will be fixed in 3.3.1.

0 Karma

sideview
SplunkTrust
SplunkTrust

That is indeed puzzling. Can you email me the full XML? support [at] sideviewapps.com? And are there by any chance any javascript errors on the page?

That's one thing that can cause baffling behavior - if something on the page is throwing a javascript error. Are there any other custom modules on the page, or anything custom in application.js? It might not be anything related to Sideview Utils at all.

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

February 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...