# Scripted fileds label

**URL:** https://discuss.elastic.co/t/scripted-fileds-label/94731
**Category:** Kibana
**Created:** [July 27, 2017, 4:01am UTC](https://discuss.elastic.co/t/scripted-fileds-label/94731 "2017-07-27T04:01:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Mehran\_Arefkhani](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@Mehran\_Arefkhani](https://discuss.elastic.co/u/Mehran_Arefkhani)
#### Post date: [July 27, 2017, 4:01am UTC](https://discuss.elastic.co/t/scripted-fileds-label/94731/1 "2017-07-27T04:01:19Z")

</div>

![](https://us1.discourse-cdn.com/elastic/original/3X/6/8/68b7bc354a41bbbb7a20e903ab2459027bab1937.png)

Hi 🙂  
as you can see in above picture i have to use "doc['server.id'].value" in script to use it in url. but in label i want to show server.name to be more user friendly.how can i show server.name in label Template?

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [July 28, 2017, 6:27pm UTC](https://discuss.elastic.co/t/scripted-fileds-label/94731/2 "2017-07-28T18:27:30Z")

</div>

hi @Mehran_Arefkhani,

that's a sneaky one 😉 No, you won't be able to do that. The label template allows you to plug in the value of the field (in this case [server.id](http://server.id)), but not put in a different value altogether.

Is it possible that in your `Script`, you would just concatenate both the value and the id, and wrap that concatenated value in the template?

---

<div class="post-metadata">

### Author: ![Mehran\_Arefkhani](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@Mehran\_Arefkhani](https://discuss.elastic.co/u/Mehran_Arefkhani)
#### Post date: [July 29, 2017, 3:20am UTC](https://discuss.elastic.co/t/scripted-fileds-label/94731/3 "2017-07-29T03:20:17Z")

</div>

tnx for your reply :).  
yeah i can concatenate server.name+"\_"+[server.id](http://server.id) but if i do template label will be some things like this "n1\_f41251122231dfsd"  
do you mean this?

---

<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: [August 26, 2017, 3:21am UTC](https://discuss.elastic.co/t/scripted-fileds-label/94731/4 "2017-08-26T03:21:06Z")

</div>

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