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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...