Dashboards & Visualizations

Dependent Drop Down & Radio Button XML

IRHM73
Motivator

Hi, I wonder whether someone could help me please.

HereUsing one of the tutorials I've put together the script below which I'm trying to create the following scenario:

  • The user selects a value from a drop down menu, which
  • Then populates the pertinent radio buttons for the drop down value selected.

    A form input element's selected value is used to populate another form input element's options.
    * All detail.ur="*" | stats count by tags.tName * All detail.ur="*" detail.fId=$username$| stats count by detail.fId
    Table of eventsdetail.ur="*" tags.tName=$username$ | head 1000 | table tags.tName, _raw-7d@dnow

The problem I have is that the popualtion of the radio button constantly displays the message "Populating" and despite spending severqal hours on this I can get this to change and populate the appropriate radio buttons.

Could someone possibly look at this please and let me know where I'm going wrong.

Many thanks and kind regards

Chris

Tags (3)
0 Karma

IRHM73
Motivator

Hi, thank you all for taking the time to look at my post, but I realised that I had the 'Parent' (Dropdown menu) and 'Child' (Radio Buttons) fields the wrong way around.

I've now changed the code to the following and the dropdown menu and radio buttons now work.

<form>
  <label>Cascading Form Input Element - Tutorial Clone</label>
  <description>A form input element's selected value is used to populate another form input element's options.</description>
  <fieldset autoRun="true">
    <input type="dropdown" token="username">
      <default>*</default>
      <choice value="*">All</choice>
      <populatingSearch fieldForValue="detail.fId" fieldForLabel="detail.fId" earliest="-24h" latest="now">
        <![CDATA[detail.ur="*" | stats count by detail.fId]]>
      </populatingSearch>
    </input>
    <input type="radio" token="source">
      <default>*</default>
      <choice value="*">All</choice>
      <populatingSearch fieldForValue="tags.tName" fieldForLabel="tags.tName" earliest="-24h" latest="now">
        <![CDATA[detail.ur="*" detail.fId=$username$| stats count by tags.tName]]>
      </populatingSearch>
    </input>
  </fieldset>
  <row>
    <table>
      <title>Table of events</title>
      <searchString>detail.ur="*" detail.fId="*" tags.tName="*" detail.fId=$username$ tags.tName=$source$ | table tags.tName, detail.ur, generatedAt, detail.fId, detail.messageId, eventId _raw</searchString>
      <earliestTime>-24h@h</earliestTime>
      <latestTime>now</latestTime>
    </table>
  </row>
</form>

Many thanks and kind regards

Chris

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!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...