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!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...