# Scripted field use another scripted field

**URL:** <https://discuss.elastic.co/t/scripted-field-use-another-scripted-field/101187>\
**Category:** Elasticsearch\
**Created:** [September 20, 2017, 2:09pm UTC](https://discuss.elastic.co/t/scripted-field-use-another-scripted-field/101187 "2017-09-20T14:09:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RickT](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@RickT](https://discuss.elastic.co/u/RickT)\
**Post date:** [September 20, 2017, 2:09pm UTC](https://discuss.elastic.co/t/scripted-field-use-another-scripted-field/101187/1 "2017-09-20T14:09:06Z")

</div>

Hello,  
I'm searching for the method to use scripted field in coding another scripted field.  
For beginning, is it possible ?

i explain...  
i have a SF named **lap1**.  
The associed script is : `(doc['TimeTab2'].value - doc['TimeTab1'].value) / 1000 / 60`

i have a SF named **lap2**.  
The associed script is : `(doc['TimeJmp2'].value - doc['TimeJmp1'].value) / 1000 / 60`

i would create a new SF named **lapFinal** whith this script : `lap1 + lap2`

My question : is it possible and how to do ?  
Thanks.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 21, 2017, 9:15pm UTC](https://discuss.elastic.co/t/scripted-field-use-another-scripted-field/101187/2 "2017-09-21T21:15:35Z")

</div>

You cannot do this sorry.

---

<div class="post-metadata">

**Author:** ![RickT](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@RickT](https://discuss.elastic.co/u/RickT)\
**Post date:** [October 2, 2017, 1:00pm UTC](https://discuss.elastic.co/t/scripted-field-use-another-scripted-field/101187/3 "2017-10-02T13:00:39Z")

</div>

Thank you warkolm.  
Too bad for us ! ☹

---

<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 30, 2017, 1:01pm UTC](https://discuss.elastic.co/t/scripted-field-use-another-scripted-field/101187/4 "2017-10-30T13:01:22Z")

</div>

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