Splunk Search

Eval and match create a new field

Splunk_rocks
Path Finder

I have fields like Uid and Case If the case is authentication then then my new field has to show Uid number.

Case. uid

authentication 12r345567

signoff z234567
signoff rt34567
authentication 34r56789
authentication 24r56789

Im just trying to write eval statement like eval New_UId = if(match(case=authentication "uid", "None" )

but could not make it so just posting here ..

Tags (2)
0 Karma
1 Solution

493669
Super Champion

try this run anywhere search:

| makeresults |eval uid=1, case1="authentication"|eval New_UId = if(case1=="authentication" ,uid, "None" )

View solution in original post

0 Karma

493669
Super Champion

try this run anywhere search:

| makeresults |eval uid=1, case1="authentication"|eval New_UId = if(case1=="authentication" ,uid, "None" )
0 Karma

Splunk_rocks
Path Finder

Thanks bud it worked ..

0 Karma

mdsnmss
SplunkTrust
SplunkTrust

You should be able to create a calculated field that is just if(case=authentication,uid,"None")

0 Karma

Splunk_rocks
Path Finder

Thank you mdsnmss

0 Karma
Get Updates on the Splunk Community!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...