Splunk Enterprise

Dynamically load a dropdown from a value chosen from another

fabrizioalleva
Path Finder

Hi all,

I'm trying to populate a dropdown with dynamic values according the value coming from another dropdown, like unit measure for example:

if the dropdown A contains Fruits the B will contain (1000 gr, 100 hg, 1 kG ) instead if the A cointains Liquid B will cointains (1000 ml. 100 cl. )

where 1000/100/1 will be Field For Value

and gr hg and KG will be field for Label.

 

I'm trying something like this :

| makeresults
| eval type="fruits"
| eval unit=case(type=="fruits","1000 gr, 100 hg, 1 kg", type=="liquid","1000 ml, 100 cl", 1=1, "no vlaue")
| rex field=unit "(?<A>.*)\,(?<B>.*)"
| fields A B

But I'm not be able to parameterize the two or three values in the fields to make the split..

Thanks

 

Labels (1)
0 Karma
1 Solution

renjith_nair
Legend

Does this work for you?

| makeresults
| eval type="fruits"
| eval unit=case(type=="fruits","1000#gr, 100#hg, 1#kg", type=="liquid","1000#ml, 100#cl", 1=1, "no vlaue")|makemv unit delim=","|mvexpand unit
| rex field=unit "(?<A>.*)#(?<B>.*)"
| fields A B
---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

0 Karma

renjith_nair
Legend

Does this work for you?

| makeresults
| eval type="fruits"
| eval unit=case(type=="fruits","1000#gr, 100#hg, 1#kg", type=="liquid","1000#ml, 100#cl", 1=1, "no vlaue")|makemv unit delim=","|mvexpand unit
| rex field=unit "(?<A>.*)#(?<B>.*)"
| fields A B
---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

fabrizioalleva
Path Finder

Thanks a lot

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...