Security

How to update multiple value in same field using eval command?

Rajiv_splunk
Path Finder

HI Everyone,

I am trying to update multiple value in the same field using eval case command but it returning the below error

Error in 'eval' command: The expression is malformed. Expected ).

My requirement is to update when website is ABC the delievery_status should be on_the_way, and when website is xyz the delievery_status should be delievered else it should say Nt delievered. and i am writing the below case statement

| eval delievery_status = case (website="ABC" "on_the_way" website="xyz", "delievered", "Not_delievered")

Can anyone please help me on this what i am missing in this

Tags (1)
0 Karma
1 Solution

DanielPriceUK
Path Finder

| eval delievery_status =
case (website="ABC","on_the_way",
website="xyz", "delievered",
True(),"Not_delievered")

View solution in original post

Rajiv_splunk
Path Finder

Thanks a lot @DanielPriceUK . It works :)... Thanks for a quick reply

DanielPriceUK
Path Finder

| eval delievery_status =
case (website="ABC","on_the_way",
website="xyz", "delievered",
True(),"Not_delievered")

Rajiv_splunk
Path Finder

Thanks a lot @DanielPriceUK . It works :)... Thanks for a quick reply

0 Karma
Get Updates on the Splunk Community!

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2025 SplunkTrust is officially open! If you ...

Splunk Answers Content Calendar, June Edition II

Get ready to dive into Splunk Dashboard panels this week! We'll be tackling common questions around ...

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

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