Dashboards & Visualizations

How to Rename event in a field

woodlandrelic
Path Finder

Hi 

Am trying to change the "Cloud Service Provider (CSP)"  to "CSP". The field name is "Registration Type"

Screenshot (8).png

Thanks

Labels (1)
0 Karma
1 Solution

woodlandrelic
Path Finder


Thank you so much it worked. This was the result much appreciated.

| eval "Registration Type"=if('Registration Type'=="Cloud Service Provider (CSP)","CSP",'Registration Type')
| eval "Registration Type"=if('Registration Type'=="Assess Only","AO",'Registration Type')
| eval "Registration Type"=if('Registration Type'=="Assess and Authorize","AA",'Registration Type')

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| eval "Registration Type"=if('Registration Type'=="Cloud Service Provider (CSP)","CSP",'Registration Type')

woodlandrelic
Path Finder

@ITWhisperer  Thanks but am getting an error msg. It seems am missing something.Screenshot (11).pngScreenshot (9).png

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The if function has only 3 parameters, the comparison, the result if true, and the result if false. You could split what you have over a number of eval commands, comparing the field to the different strings you want to change, or you can replace the if function with a case function.

https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/ConditionalFunctions 

woodlandrelic
Path Finder


Thank you so much it worked. This was the result much appreciated.

| eval "Registration Type"=if('Registration Type'=="Cloud Service Provider (CSP)","CSP",'Registration Type')
| eval "Registration Type"=if('Registration Type'=="Assess Only","AO",'Registration Type')
| eval "Registration Type"=if('Registration Type'=="Assess and Authorize","AA",'Registration Type')

0 Karma
Get Updates on the Splunk Community!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

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

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...