# Elasticsearch transform index using scripted fields

**URL:** <https://discuss.elastic.co/t/elasticsearch-transform-index-using-scripted-fields/249385>\
**Category:** Elasticsearch\
**Tags:** transforms\
**Created:** [September 21, 2020, 3:11pm UTC](https://discuss.elastic.co/t/elasticsearch-transform-index-using-scripted-fields/249385 "2020-09-21T15:11:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![geekganesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geekganesh/32/47826_2.png) [@geekganesh](https://discuss.elastic.co/u/geekganesh)\
**Post date:** [September 21, 2020, 3:11pm UTC](https://discuss.elastic.co/t/elasticsearch-transform-index-using-scripted-fields/249385/1 "2020-09-21T15:11:14Z")

</div>

I am using Elasic Cloud v7.5. I created two scripted fields. I am able to search and aggregate on the fields. I tried to transform to new index using the aggregate of scripted fields but the values are coming as zero in destination index. I used Create Transform UI in Kibana and tried to create the transform index. The destination index does not considering scripted fields.

Do we need to update the query in Advanced Pivot Editor?

---

<div class="post-metadata">

**Author:** ![walterra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/walterra/32/139867_2.png) [@walterra](https://discuss.elastic.co/u/walterra)\
**Post date:** [September 22, 2020, 10:00am UTC](https://discuss.elastic.co/t/elasticsearch-transform-index-using-scripted-fields/249385/2 "2020-09-22T10:00:45Z")

</div>

To pin down your issue, can you explain if the scripted fields you created refer to Kibana's scripted fields or Elasticsearch's script fields or even another feature? Unfortunately both are unsupported by transforms, but you can use scripts in aggregations like scripted metric.

If you're able to post some sample data and the configurations you're trying to run, we may be able to help out a bit more in working towards a solution.

---

<div class="post-metadata">

**Author:** ![geekganesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geekganesh/32/47826_2.png) [@geekganesh](https://discuss.elastic.co/u/geekganesh)\
**Post date:** [September 29, 2020, 7:12am UTC](https://discuss.elastic.co/t/elasticsearch-transform-index-using-scripted-fields/249385/3 "2020-09-29T07:12:30Z")

</div>

Thanks for the reply. While doing transform, I used scripts in aggregations and it solved the problem.

---

<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 27, 2020, 7:12am UTC](https://discuss.elastic.co/t/elasticsearch-transform-index-using-scripted-fields/249385/4 "2020-10-27T07:12:59Z")

</div>

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