Splunk Search

how to make eval function to work for mutivalued fields ..... to display

dilstn
Explorer

Here is the eval function which i use in particular field (which is a multivalued field) and then this value n display only for the first value of field....can u guide me to get the other value for the multivalued field .....

.......|eval n=if(isint(field1),"yes","no")| table sno,field1,n

sno field1 n
1 102 yes
132
234
P21
PSP

so for the remaining field1 value the eval function doesnt show the value.....

so i need like this...

Sno field1 n
1 102 yes
132 yes
234 yes
PGT no
PSP no

Tags (1)
0 Karma

kristian_kolb
Ultra Champion

Perhaps the following may help;

mvexpand - make several events out of an event with a multivalued field (one for each value)

http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Mvexpand

the mv* functions for eval, e.g. mvindex() and mvfilter() - see the examples

http://docs.splunk.com/Documentation/Splunk/5.0.1/SearchReference/CommonEvalFunctions

/Kristian

0 Karma
Get Updates on the Splunk Community!

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

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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