All Apps and Add-ons

Sideview: How to get URL parameters to override pulldown default values?

jamesvz84
Communicator

Requirement: Need to provide default values to Pulldowns. However, if URL parameters happen to exist, those should override the Pulldown defaults.

I am able to get defaults working using True on a static option or using ValueSetter to select one of the populating search results.

I am able to get URL parameters working, if I do not specify any defaults (using URLLoader module).

However, if I have defaults AND use URLLoader, I cannot get the URL parameters to override the defaults. What is the proper way to accomplish this?

1 Solution

sideview
SplunkTrust
SplunkTrust

This is what the ValueSetter module's "allowClobber" param is for. That param defaults to true, meaning that the ValueSetter module will set the key(s) even if there are existing values from upstream. However you can set the param explicitly to False, in which case it will have the behavior you're looking for. Namely, the ValueSetter module will provide the default if there's none in the URL, and it will defer to the URL value when there is one present.

The page for the ValueSetter in the Sideview Utils docs speaks about all this. Go to that page in the app's navbar "Module Documentation > The ValueSetter modules > the ValueSetter module", and check out the paragraph titled in bold "Setting fallback defaults with "allowClobber".

As always, if you're on an older version of Sideview Utils make sure to upgrade. The latest version is 3.3.1 and available for free from the Sideview website at http://sideviewapps.com/apps/sideview-utils/

View solution in original post

sideview
SplunkTrust
SplunkTrust

This is what the ValueSetter module's "allowClobber" param is for. That param defaults to true, meaning that the ValueSetter module will set the key(s) even if there are existing values from upstream. However you can set the param explicitly to False, in which case it will have the behavior you're looking for. Namely, the ValueSetter module will provide the default if there's none in the URL, and it will defer to the URL value when there is one present.

The page for the ValueSetter in the Sideview Utils docs speaks about all this. Go to that page in the app's navbar "Module Documentation > The ValueSetter modules > the ValueSetter module", and check out the paragraph titled in bold "Setting fallback defaults with "allowClobber".

As always, if you're on an older version of Sideview Utils make sure to upgrade. The latest version is 3.3.1 and available for free from the Sideview website at http://sideviewapps.com/apps/sideview-utils/

Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...