All Apps and Add-ons

sideview multiple pulldowns

jgauthier
Contributor

Greetings,

I am trying to use two pull downs. The first based from a search, the second static only. It seems that the second always contains values (sort of) from the first. Can I use two pulldowns in a search module and only have one contain static entries?

Example:

<module name="Search" layoutPanel="panel_row2_col1" autoRun="True">
    <param name="search">-- this is my query that populate the pull down --</param>
    <module name="Pulldown">
        <param name="name">selectedowner</param>
        <param name="label">Owner</param>
        <param name="valueField">owner</param>
        <param name="staticOptions">
            <list>
                <param name="label">All</param>
                <param name="value">%</param>
            </list>
        </param>
        <module name ="Search">
            <param name="search"/>
            <module name="Pulldown" >
                <param name="name">timeframe</param>
                <param name="label">Time Frame</param>
                <param name="valueField">timeframe</param>
                <param name="size">2</param>
                <param name="staticOptions">
                    <list>
                        <param name="label">Last 7 days</param>
                        <param name="value">unix_timestamp(now())-(86400*7)</param>
                    </list>
                    <list>
                        <param name="label">Last 30 days</param>
                        <param name="value">unix_timestamp(now())-(86400*30)</param>
                    </list>
                </param>
                <module name="Search">
[snip]

The second pull down contains the first two static options, and then "No value found" for every record that the search produces above. I would really like to have this contain only the two static entries. Is that possible?

Tags (2)

sideview
SplunkTrust
SplunkTrust

You just need to remove the

<param name="valueField">timeframe</param>

param from the second Pulldown. The valueField param is what tell the Pulldown to render dynamic values. So it is looking into the current search results it has, which are of course the same results as it's upstream Pulldown had, and it's looking for a field called "timeframe". There isn't one presumably, so it renders a lot of "(no value found)".

just delete that param and you'll be good to go.

Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...