Splunk Search

Reordering fields

mnj1809
Path Finder

Hello Splunkers,

I've a Region filter over the dashboard. This Region filter has values AMER and EMEA.

 

mnj1809_0-1705319723804.png

I've a requirement to reorder the above fields based on the selection of Region filter as follows. I want "<Region> Mandatory" field to be appear before "<Region> All"

mnj1809_1-1705320516370.png

Thanks in advance.

@tscroggins @yuanliu @bowesmana 

 

 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Try putting an extra space before Mandatory so that lexicographical sorting will prioritise above single spaced values

| foreach "* Mandatory"
    [| rename "<<FIELD>>" as "<<MATCHSEG1>>  Mandatory"]

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try putting an extra space before Mandatory so that lexicographical sorting will prioritise above single spaced values

| foreach "* Mandatory"
    [| rename "<<FIELD>>" as "<<MATCHSEG1>>  Mandatory"]
0 Karma

mnj1809
Path Finder

Thanks @ITWhisperer. It work like a charm.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @mnj1809,

could you share your search and the possible values for regions in text mode?

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...