# Call runtime field to another runtime field while creating

**URL:** <https://discuss.elastic.co/t/call-runtime-field-to-another-runtime-field-while-creating/337235>\
**Category:** Kibana\
**Tags:** runtime\
**Created:** [June 29, 2023, 7:40pm UTC](https://discuss.elastic.co/t/call-runtime-field-to-another-runtime-field-while-creating/337235 "2023-06-29T19:40:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubhamra](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rubhamra](https://discuss.elastic.co/u/rubhamra)\
**Post date:** [June 29, 2023, 7:40pm UTC](https://discuss.elastic.co/t/call-runtime-field-to-another-runtime-field-while-creating/337235/1 "2023-06-29T19:40:57Z")

</div>

I have question about runtime field, I want to call a runtime field to another runtime field.  
Suppose I have created a runtime field called (numberOfdays) which is calculating count of days  
between two dates.  
Now I have the number of days in runtime field named (numberOfdays)

Now I want to create another runtime field but I want call that runtime field (numberOfdays) inside the script.

I was trying mbut it's not working I am not able to call one runtime field in another runtime field.

Let me know if that possible.

---

<div class="post-metadata">

**Author:** ![BenB196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benb196/32/83401_2.png) [@BenB196](https://discuss.elastic.co/u/BenB196)\
**Post date:** [June 29, 2023, 10:11pm UTC](https://discuss.elastic.co/t/call-runtime-field-to-another-runtime-field-while-creating/337235/2 "2023-06-29T22:11:59Z")

</div>

I don't think you are able to nest runtime fields, and even if you could, I don't think it would be a very good idea, as you'd probably take a significant performance hit. I think the correct way to do this would be to re-implement the logic you used in `numberOfdays` in the new runtime field

---

<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:** [July 27, 2023, 10:12pm UTC](https://discuss.elastic.co/t/call-runtime-field-to-another-runtime-field-while-creating/337235/3 "2023-07-27T22:12:57Z")

</div>

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