Getting Data In

How do I get unique values in form dropdown?

oriches
Explorer

I want the list in the dropdown to be unique values in a form.

What do I have to put in the 'populatingSearch' element to make sure every value is unique?

Tags (2)
0 Karma
1 Solution

bwooden
Splunk Employee
Splunk Employee

Let's say your're populating the dropdown with hosts, you can dedup a few ways in Splunk.

One way would be to dedup the field host:

... | dedup host

Another would be to use stats

... | stats values(host) as host

I generally use the dedup command in this situation: http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/Dedup

View solution in original post

0 Karma

bwooden
Splunk Employee
Splunk Employee

Let's say your're populating the dropdown with hosts, you can dedup a few ways in Splunk.

One way would be to dedup the field host:

... | dedup host

Another would be to use stats

... | stats values(host) as host

I generally use the dedup command in this situation: http://docs.splunk.com/Documentation/Splunk/5.0.3/SearchReference/Dedup

0 Karma

oriches
Explorer

I got it to work with the following 'host | dedup host'

0 Karma

oriches
Explorer

I tried '| dedup host' but it returned nothing...

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...