All Apps and Add-ons

Setting a default value for a drop down list

ahogbin
Communicator

Hello.

I am trying to set a default value for a drop down list populated from a search but no matter what I try the default keeps on setting itself to 'All' despite there being no 'All' in the list of available options (the list is derived from a lookup table).


| inputlookup Safire_Broker.csv | dedup ACTION


ACTION
Quote Type....


$name$

I have checked some of the previous that had similar queries but none of the answers tried have worked.

Any help is greatly appreciated.

Cheers,

Alastair

Tags (2)
0 Karma
1 Solution

sideview
SplunkTrust
SplunkTrust

1) In a dynamic Pulldown module, if you want the "All" option to go away, you have to set

<param name="staticOptions></param>

Basically the default value of staticOptions is "All/*" so you have to explicitly set it to null to take it away.

There is a docs page in Sideview Utils dedicated to this exact topic, at

"Module Documentation - form element modules - The Pulldown module - Configuring the 'all' options"

(make sure you're on a relatively recent version of utils and not 1.3.5 as this docs page probably didn't exist back in the ancient 1.3.5 version)

2) As far as setting one of the dynamic options to be selected by default in a dynamic Pulldown, this is fairly straightforward and you use the ValueSetter module.

  • Go to "Module Documentation > The ValueSetter Modules > The ValueSetter Module", and it will give you a working example of how to use ValueSetter to prepopulate a dynamic Pulldown and tell you about it all.

  • There is a link to that same page from the "notes" section in the docs page "Module Documentation - form element modules - The Pulldown Module - dynamic config".

View solution in original post

0 Karma

sideview
SplunkTrust
SplunkTrust

1) In a dynamic Pulldown module, if you want the "All" option to go away, you have to set

<param name="staticOptions></param>

Basically the default value of staticOptions is "All/*" so you have to explicitly set it to null to take it away.

There is a docs page in Sideview Utils dedicated to this exact topic, at

"Module Documentation - form element modules - The Pulldown module - Configuring the 'all' options"

(make sure you're on a relatively recent version of utils and not 1.3.5 as this docs page probably didn't exist back in the ancient 1.3.5 version)

2) As far as setting one of the dynamic options to be selected by default in a dynamic Pulldown, this is fairly straightforward and you use the ValueSetter module.

  • Go to "Module Documentation > The ValueSetter Modules > The ValueSetter Module", and it will give you a working example of how to use ValueSetter to prepopulate a dynamic Pulldown and tell you about it all.

  • There is a link to that same page from the "notes" section in the docs page "Module Documentation - form element modules - The Pulldown Module - dynamic config".

0 Karma

sideview
SplunkTrust
SplunkTrust

No problem at all. 😃

0 Karma

ahogbin
Communicator

Works a treat.. thank you as always 🙂

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...