# Is sorting is possible in scripted metric once we added the values to state.transactions =\[\]

**URL:** <https://discuss.elastic.co/t/is-sorting-is-possible-in-scripted-metric-once-we-added-the-values-to-state-transactions/225352>\
**Category:** Elasticsearch\
**Created:** [March 27, 2020, 8:04am UTC](https://discuss.elastic.co/t/is-sorting-is-possible-in-scripted-metric-once-we-added-the-values-to-state-transactions/225352 "2020-03-27T08:04:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anjilinga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anjilinga/32/86010_2.png) [@anjilinga](https://discuss.elastic.co/u/anjilinga)\
**Post date:** [March 27, 2020, 8:04am UTC](https://discuss.elastic.co/t/is-sorting-is-possible-in-scripted-metric-once-we-added-the-values-to-state-transactions/225352/1 "2020-03-27T08:04:24Z")

</div>

i have added the values to state.transactions = [2,10,3,40,5]  
is sorting is possible in map script or in combined 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:** [April 24, 2020, 8:04am UTC](https://discuss.elastic.co/t/is-sorting-is-possible-in-scripted-metric-once-we-added-the-values-to-state-transactions/225352/2 "2020-04-24T08:04:26Z")

</div>

Closed on April 24, 2020, 8:04am UTC

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