Splunk Search

searchFieldsToDisplay order

timmalos
Communicator

I cant manage to find a way to order my select as I want.
I got this script:

        <module name="SearchSelectLister" layoutPanel="viewHeader" autoRun="True">
            <param name="searchFieldsToDisplay">
                <list>
                    <param name="value">Name</param>
                    <param name="label">Name</param>
                </list>
                <list>
                    <param name="value">Id</param>
                    <param name="label">Id</param>
                </list>
            </param>

My problem is that the values in the pulldown are shown in this order : Name1, Id1, Name2, Id2, Name3, Id3 etc... I would the following order : Name1, Name2, Name3,...Name N, Id1, Id2,...IdN

Is it possible?

0 Karma
1 Solution

timmalos
Communicator

I got around my problem and did a search that returns both Name and Id in a same field (Sorted like i wanted) so that I can have only one list in my searchFieldsToDisplay module.

index="infra_vmware" $host$ earliest=-2h latest=now|dedup Id| eval Id=Id+","+Name)|table Id| makemv delim="," Id|mvexpand Id|sort Id

Don't know if it's the best solution, but works 🙂

View solution in original post

0 Karma

timmalos
Communicator

I got around my problem and did a search that returns both Name and Id in a same field (Sorted like i wanted) so that I can have only one list in my searchFieldsToDisplay module.

index="infra_vmware" $host$ earliest=-2h latest=now|dedup Id| eval Id=Id+","+Name)|table Id| makemv delim="," Id|mvexpand Id|sort Id

Don't know if it's the best solution, but works 🙂

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!

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 ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...