# How to generate scripted field dynamic

**URL:** <https://discuss.elastic.co/t/how-to-generate-scripted-field-dynamic/102135>\
**Category:** Kibana\
**Created:** [September 28, 2017, 2:52pm UTC](https://discuss.elastic.co/t/how-to-generate-scripted-field-dynamic/102135 "2017-09-28T14:52:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajit](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ajit](https://discuss.elastic.co/u/ajit)\
**Post date:** [September 28, 2017, 2:52pm UTC](https://discuss.elastic.co/t/how-to-generate-scripted-field-dynamic/102135/1 "2017-09-28T14:52:57Z")

</div>

I am creating percentage as scripted field in kibana with hard coded columns or field values. But I need only those columns or fields which are selected in visualisation. So that I will get percentage on only selected fields. For this requirement I need dynamically values from only selected columns in visualisation.  
This is my script ((doc['Math'].value+doc['English'].value)/200)\*100  
But if I select only Math column in visualisation then I should get percentage only for Math.  
Meaning that I need only selected column values in visualisation in script dynamically.

Please provide solution.

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [September 28, 2017, 5:24pm UTC](https://discuss.elastic.co/t/how-to-generate-scripted-field-dynamic/102135/2 "2017-09-28T17:24:55Z")

</div>

It's not possible to dynamically update scripted fields at the moment.

---

<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:** [October 26, 2017, 5:25pm UTC](https://discuss.elastic.co/t/how-to-generate-scripted-field-dynamic/102135/3 "2017-10-26T17:25:20Z")

</div>

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