Using If condition in Kibana Data Table


(Vivek Sharma) #1

Hi

I am trying to create a data table visualization based on my logs received.

Logs are:

Order Number Order reached to Vendor
OR001 Yes
OR002 No
OR003 Yes

Now what I am trying to do here is that If "order reached to vendor" is Yes then display "Success" in data table else display "Failure".

In other words I am trying to use a if condition in data table. Tried to insert JSON condition also but could not succeed.

Can anyone please help.


(Lukas Olson) #2

Sounds like a perfect place to use a scripted field, which you can add by going to Management, then Index Patterns, then clicking on your index pattern, then Scripted Fields.

The scripted field would look something like this:

doc['orderReachedToVendor'].value ? 'Success' : 'Failure'

Could you give that a try?


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.