Field formatter: add link of discover to the field

Hello there

I am trying to do the following:

On my visualise item i have created a data table where i split rows by buckets to list my applications with errors on it.

Its like:
application1 200
application2 15
application 3 1
application7 5

it does not show up apps without error of course

And i would like to make the string "applicationX" clickable with a hyperlink redirected to it discover saved search

is that possible? through fields formatting for example?

Hi @Kwiskas,

Yes, you should be able to do this using scripted fields.

In Kibana, you can go to Settings > Index Patterns > your pattern > Scripted fields to add a new scripted field.

You will probably want to add one of type string (or number might work too), and format url.

Then grab the URL to discover and replace the term you want to filter against with {{value}}, e.g.

https://kibana-url/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-30m,to:now))&_a=(columns:!(_source),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'90943e30-9a47-11e8-b64d-95841ca0b247',key:response.keyword,negate:!f,params:(query:{{value}}),type:phrase,value:'200'),query:(match:(response.keyword:(query:'200',type:phrase))))),index:'your_pattern_id',interval:auto,query:(language:kuery,query:''),sort:!(timestamp,desc))

This is what will go in the URL field.

Hopefully this points you in the right direction - let me know if you have any luck!

Tried but no result :frowning:

The problem is that the link to the result is different of the result or the value itself

What i have is a dashboard with a response from fields.application

example: if i have 500 errors from a virtual machine named application1 under fields.application tab i see:

application 1 500

and i would like to make "clickable" fields.application resposne when it gets up on my dashboard