# Filter current dashboard with URL formatter

**URL:** <https://discuss.elastic.co/t/filter-current-dashboard-with-url-formatter/204456>\
**Category:** Kibana\
**Created:** [October 21, 2019, 12:02pm UTC](https://discuss.elastic.co/t/filter-current-dashboard-with-url-formatter/204456 "2019-10-21T12:02:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tomr/32/48260_2.png) [@tomr](https://discuss.elastic.co/u/tomr)\
**Post date:** [October 21, 2019, 12:02pm UTC](https://discuss.elastic.co/t/filter-current-dashboard-with-url-formatter/204456/1 "2019-10-21T12:02:58Z")

</div>

I'm trying to use the index pattern string URL formatter to turn list items in data tables into clickable links that will filter the current page.

It works more or less as expected from TSVB, but in mainline Kibana it seems that index-pattern level URLs _must_ start with `https?://`

This works in TSVB:

```auto
/app/kibana#/dashboard/mydash?_a=(filters:!((meta:(alias:!n,disabled:!f,key:agent.hostname,negate:!f,params:(query:'{{key}}'),type:phrase,value:'{{key}}'),query:(match:(agent.hostname:(query:'{{key}}',type:phrase))))))

```

Obviously it clobbers any existing filters, but I can live with that.

Any way to get a similar thing happening outside TSVB? Is this more of a github conversation? I had a look through the code myself, but `grep -r http` is pretty pointless 😛

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [October 21, 2019, 12:58pm UTC](https://discuss.elastic.co/t/filter-current-dashboard-with-url-formatter/204456/2 "2019-10-21T12:58:23Z")

</div>

Hi, having relative URLs via the formatter should work fine and I don't have problems in a local instance. Could you elaborate what exactly you doing and what error you are seeing and on which Kibana version?

One thing I notice from your example is that the placeholder has to be `{{value}}` in the field formatters, not `{{key}}`.

Regular data tables also have a related feature already built in that might be enough for your use case - if you hover over a cell in a data table, the "+" and "-" icons add filter for the given value:

 ![02](https://us1.discourse-cdn.com/elastic/original/3X/e/0/e0c29603e3829ab6a2ece123ee02b97bf2a95150.png)

---

<div class="post-metadata">

**Author:** ![tomr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tomr/32/48260_2.png) [@tomr](https://discuss.elastic.co/u/tomr)\
**Post date:** [October 21, 2019, 8:04pm UTC](https://discuss.elastic.co/t/filter-current-dashboard-with-url-formatter/204456/3 "2019-10-21T20:04:10Z")

</div>

True, and TSVB (where the example works) requires `{{key}}` rather than `{{value}}`

I see identical behaviour in Kibana 6.6.1, 7.1.1 and 7.4.0

When you say you don't have a problem in a local instance, have you taken it through to actually clicking the link?

To reproduce what I'm seeing:

1. Select `URL` from the string formatters drop down
2. Enter something in the `Label` field like `MyLabel for {{value}}`
3. Type a relative URL into the `Link` formatter - including `{{value}}` makes no difference, but you might as well do it
4. Note that the `Output` section of the Samples table a) does not contain clickable links and b) uses the `Link` format rather than the `Label` format
5. Prepend the relative link with `http://` on character at a time, observing the Sample output column
6. Note that when the final `/` character is entered, entries in the output column a) become links and b) start rendering the `Label` instead of the `Link`

 ![kibana2](https://us1.discourse-cdn.com/elastic/original/3X/c/2/c2bd82fe0e52fab9678901d3b92b523061fe163d.png) ![kibana3](https://us1.discourse-cdn.com/elastic/original/3X/2/3/233c8fca6bed76b17a10855d94b1cee6dc71c033.png) ![kibana1](https://us1.discourse-cdn.com/elastic/original/3X/2/0/2032dbe90d36c37e8ba170db63c1bebec278e425.png)

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [October 22, 2019, 2:48pm UTC](https://discuss.elastic.co/t/filter-current-dashboard-with-url-formatter/204456/4 "2019-10-22T14:48:31Z")

</div>

Ah, you are right, I only tested in Discover and it looks like relative URLs work fine there - my bad, sorry. There is a bug with this in visualizations which is tracked here: [https://github.com/elastic/kibana/issues/35235](https://github.com/elastic/kibana/issues/35235) - a fix should be released with the upcoming versions 7.4.1 and 7.5.0

---

<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:** [November 19, 2019, 2:54pm UTC](https://discuss.elastic.co/t/filter-current-dashboard-with-url-formatter/204456/5 "2019-11-19T14:54:55Z")

</div>

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