# URL Filed formatter - to get value of other fields using script

**URL:** <https://discuss.elastic.co/t/url-filed-formatter-to-get-value-of-other-fields-using-script/261442>\
**Category:** Kibana\
**Created:** [January 18, 2021, 3:25pm UTC](https://discuss.elastic.co/t/url-filed-formatter-to-get-value-of-other-fields-using-script/261442 "2021-01-18T15:25:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gulshann](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@gulshann](https://discuss.elastic.co/u/gulshann)\
**Post date:** [January 18, 2021, 3:25pm UTC](https://discuss.elastic.co/t/url-filed-formatter-to-get-value-of-other-fields-using-script/261442/1 "2021-01-18T15:25:06Z")

</div>

Continuing the discussion from [URL field formatter - get values of other fields](https://discuss.elastic.co/t/url-field-formatter-get-values-of-other-fields/130029/2):

Can You share an example for this.

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [January 18, 2021, 3:46pm UTC](https://discuss.elastic.co/t/url-filed-formatter-to-get-value-of-other-fields-using-script/261442/2 "2021-01-18T15:46:03Z")

</div>

Hi,  
this is an example of URL script field with a field coming from a different document field:

```auto
return "https://www.test.com?q="+doc['host.keyword'].value

```

 ![Screenshot 2021-01-18 at 16.44.56](https://us1.discourse-cdn.com/elastic/original/3X/6/2/627965f2bcf65fa0b5ffcb78260bceca8eae783f.png)

---

<div class="post-metadata">

**Author:** ![gulshann](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@gulshann](https://discuss.elastic.co/u/gulshann)\
**Post date:** [January 18, 2021, 4:19pm UTC](https://discuss.elastic.co/t/url-filed-formatter-to-get-value-of-other-fields-using-script/261442/3 "2021-01-18T16:19:54Z")

</div>

Thank you

---

<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:** [February 15, 2021, 4:19pm UTC](https://discuss.elastic.co/t/url-filed-formatter-to-get-value-of-other-fields-using-script/261442/4 "2021-02-15T16:19:57Z")

</div>

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