Splunk Cloud Platform

concatenate syntax

verifi81
Path Finder

Hi folks

I'm providing a sample of many values I have for field: username

Field: username

Value: 

Roger Smith
Bob Dole
Randy Savage

I'm trying to create another field with the EVAL command called EMAIL and placing a dot between first name and last name followed by @Anonymous.com

Basically I'm trying to get the new field like this.

Field: Email

Roger.Smith@falcon.com
Bob.Dole@falcon.com
Randy.Savage@falcon.com

What would the syntax be?

 

Thanks in advance

Labels (1)
0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

@verifi81 

 

You should try something like this.

YOUR_SEARCH | eval email= replace(username," ",".")."@falcon.com" | table username email

 

Sample search.

 

| makeresults | eval _raw="
username
Roger Smith
Bob Dole
Randy Savage
" | multikv forceheader=1 | eval email= replace(username," ",".")."@falcon.com" | table username email

 

 

 

View solution in original post

0 Karma

verifi81
Path Finder

I stand corrected. It worked. Thank you!

0 Karma

verifi81
Path Finder

Hello Kamlesh,

My list of username is 1000 entries long so I won't be able to specify it like that. 

 

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@verifi81 

 

You should try something like this.

YOUR_SEARCH | eval email= replace(username," ",".")."@falcon.com" | table username email

 

Sample search.

 

| makeresults | eval _raw="
username
Roger Smith
Bob Dole
Randy Savage
" | multikv forceheader=1 | eval email= replace(username," ",".")."@falcon.com" | table username email

 

 

 

0 Karma
Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...