# Field formatter: add link of discover to the field

**URL:** <https://discuss.elastic.co/t/field-formatter-add-link-of-discover-to-the-field/193485>\
**Category:** Kibana\
**Created:** [August 2, 2019, 8:46am UTC](https://discuss.elastic.co/t/field-formatter-add-link-of-discover-to-the-field/193485 "2019-08-02T08:46:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kwiskas](https://avatars.discourse-cdn.com/v4/letter/k/f04885/32.png) [@Kwiskas](https://discuss.elastic.co/u/Kwiskas)\
**Post date:** [August 2, 2019, 8:46am UTC](https://discuss.elastic.co/t/field-formatter-add-link-of-discover-to-the-field/193485/1 "2019-08-02T08:46:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [August 2, 2019, 5:28pm UTC](https://discuss.elastic.co/t/field-formatter-add-link-of-discover-to-the-field/193485/2 "2019-08-02T17:28:44Z")

</div>

Hi @Kwiskas,

Yes, you should be able to do this using [scripted fields](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html).

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.

```auto
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!

---

<div class="post-metadata">

**Author:** ![Kwiskas](https://avatars.discourse-cdn.com/v4/letter/k/f04885/32.png) [@Kwiskas](https://discuss.elastic.co/u/Kwiskas)\
**Post date:** [August 12, 2019, 3:01pm UTC](https://discuss.elastic.co/t/field-formatter-add-link-of-discover-to-the-field/193485/3 "2019-08-12T15:01:02Z")

</div>

Tried but no result ☹

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 9, 2019, 3:01pm UTC](https://discuss.elastic.co/t/field-formatter-add-link-of-discover-to-the-field/193485/4 "2019-09-09T15:01:05Z")

</div>

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