# We can use the scripted field to return a URL string and string field formatter to format that URL string into an hyper link when rendered. But what if I want to add the URL based on some conditions? For some fields I need the URL and for some not?

**URL:** <https://discuss.elastic.co/t/we-can-use-the-scripted-field-to-return-a-url-string-and-string-field-formatter-to-format-that-url-string-into-an-hyper-link-when-rendered-but-what-if-i-want-to-add-the-url-based-on-some-conditions-for-some-fields-i-need-the-url-and-for-some-not/354230>\
**Category:** Kibana\
**Created:** [February 27, 2024, 1:17pm UTC](https://discuss.elastic.co/t/we-can-use-the-scripted-field-to-return-a-url-string-and-string-field-formatter-to-format-that-url-string-into-an-hyper-link-when-rendered-but-what-if-i-want-to-add-the-url-based-on-some-conditions-for-some-fields-i-need-the-url-and-for-some-not/354230 "2024-02-27T13:17:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![borahmridul](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@borahmridul](https://discuss.elastic.co/u/borahmridul)\
**Post date:** [February 27, 2024, 1:17pm UTC](https://discuss.elastic.co/t/we-can-use-the-scripted-field-to-return-a-url-string-and-string-field-formatter-to-format-that-url-string-into-an-hyper-link-when-rendered-but-what-if-i-want-to-add-the-url-based-on-some-conditions-for-some-fields-i-need-the-url-and-for-some-not/354230/1 "2024-02-27T13:17:34Z")

</div>

Please help as it is on priority.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [February 27, 2024, 9:47pm UTC](https://discuss.elastic.co/t/we-can-use-the-scripted-field-to-return-a-url-string-and-string-field-formatter-to-format-that-url-string-into-an-hyper-link-when-rendered-but-what-if-i-want-to-add-the-url-based-on-some-conditions-for-some-fields-i-need-the-url-and-for-some-not/354230/2 "2024-02-27T21:47:00Z")

</div>

Hi @borahmridul Welcome to the community

Just to clarify, this is a community forum staffed by volunteers; there is no priority. Every question is of equal importance, and there is no SLA for response time or even a response.

That said we would like to help, but you have not provided enough information

You will need to provide sample data, sample code/query and the desired result, and then perhaps someone will be able to help

---

<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:** [March 26, 2024, 9:47pm UTC](https://discuss.elastic.co/t/we-can-use-the-scripted-field-to-return-a-url-string-and-string-field-formatter-to-format-that-url-string-into-an-hyper-link-when-rendered-but-what-if-i-want-to-add-the-url-based-on-some-conditions-for-some-fields-i-need-the-url-and-for-some-not/354230/3 "2024-03-26T21:47:17Z")

</div>

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