# Adding runtime fields referencing hash map elements to data view

**URL:** <https://discuss.elastic.co/t/adding-runtime-fields-referencing-hash-map-elements-to-data-view/342088>\
**Category:** Kibana\
**Tags:** painless\
**Created:** [August 31, 2023, 9:25pm UTC](https://discuss.elastic.co/t/adding-runtime-fields-referencing-hash-map-elements-to-data-view/342088 "2023-08-31T21:25:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dstracha1](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@dstracha1](https://discuss.elastic.co/u/dstracha1)\
**Post date:** [August 31, 2023, 9:25pm UTC](https://discuss.elastic.co/t/adding-runtime-fields-referencing-hash-map-elements-to-data-view/342088/1 "2023-08-31T21:25:51Z")

</div>

Receiving painless script error when adding runtime field to a data view. The script references an element within a hash map in the document.  
I have a requirement to include a calculated field to a saved search that is based on a hash map element in the document.  
Is this supported and, if so, how would the element be referenced in the painless script\>

---

<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:** [September 28, 2023, 9:26pm UTC](https://discuss.elastic.co/t/adding-runtime-fields-referencing-hash-map-elements-to-data-view/342088/2 "2023-09-28T21:26:25Z")

</div>

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