fbaligand / kibana-enhanced-table

Kibana visualization like a Data Table, but with enhanced features like computed columns, filter bar, and “Split Cols” bucket
Apache License 2.0
305 stars 65 forks source link

how to get contains string in computed columns #327

Closed sandeepr43 closed 7 months ago

sandeepr43 commented 11 months ago

Hi,

I'm trying to get contains a particular string in computed columns:

For example

col1 : "I have removed this now".

col2 : (col1 contains "removed") ? "Removed" : "present".

How can we implement this in computed column?

Thanks in Advance

fbaligand commented 11 months ago

Hi,

You can find here all available functions here: https://github.com/fbaligand/kibana-enhanced-table#available-functions

To reach your goal, you can do this: indexOf(col1, "removed") != -1 ? "Removed" : "present"