# Sorting a field on the view mode

**URL:** <https://discuss.elastic.co/t/sorting-a-field-on-the-view-mode/295251>\
**Category:** Kibana\
**Created:** [January 24, 2022, 4:12pm UTC](https://discuss.elastic.co/t/sorting-a-field-on-the-view-mode/295251 "2022-01-24T16:12:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dash5000](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@dash5000](https://discuss.elastic.co/u/dash5000)\
**Post date:** [January 24, 2022, 4:12pm UTC](https://discuss.elastic.co/t/sorting-a-field-on-the-view-mode/295251/1 "2022-01-24T16:12:59Z")

</div>

Hello Everyone,

I was checking the sorting on the table visualization using the lens. I can sort the fields on the table in the edit mode, but i don't see the same option in the view mode.

This is the drop down i see it in the view mode.

![image](https://us1.discourse-cdn.com/elastic/original/3X/c/8/c8fe077b28ce1d42f3b2d8906052ab7eef532497.png)

This is the drop down i see it in the edit mode where i can see the options of sort using the ascending and descending order.  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/5/55d81639d537da70211425aee7713aca4faa8004.png)

Is this how it should be or am i missing anything ?

Regards,  
Darshan

---

<div class="post-metadata">

**Author:** ![ghudgins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghudgins/32/138532_2.png) [@ghudgins](https://discuss.elastic.co/u/ghudgins)\
**Post date:** [January 24, 2022, 5:36pm UTC](https://discuss.elastic.co/t/sorting-a-field-on-the-view-mode/295251/2 "2022-01-24T17:36:50Z")

</div>

We will be exposing the sort controls on view in 8.1 (will be released later this year) [[Lens] Allow sorting on dashboard edit & view · Issue #114625 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/114625) (here's the [PR](https://github.com/elastic/kibana/pull/117742))

---

<div class="post-metadata">

**Author:** ![dash5000](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@dash5000](https://discuss.elastic.co/u/dash5000)\
**Post date:** [January 25, 2022, 5:16pm UTC](https://discuss.elastic.co/t/sorting-a-field-on-the-view-mode/295251/3 "2022-01-25T17:16:43Z")

</div>

@ghudgins One more thing i noticed when i am sorting in the edit section is that when i have double values in the field it is not sorting it in the correct way. The field is not in the metrics section its just a field in the row section of the lens table.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/5/656724f7a171b9fbebeb8515b95d1d4c46a793cc.png)

---

<div class="post-metadata">

**Author:** ![ghudgins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghudgins/32/138532_2.png) [@ghudgins](https://discuss.elastic.co/u/ghudgins)\
**Post date:** [January 25, 2022, 5:41pm UTC](https://discuss.elastic.co/t/sorting-a-field-on-the-view-mode/295251/4 "2022-01-25T17:41:29Z")

</div>

I'm having trouble producing that issue with a double field and a number formatter. What version are you on?

Here was my simple attempt

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/0/d0e895d60ac3e3ad6fbb524593d53599bc7ea9cb.png)

---

<div class="post-metadata">

**Author:** ![dash5000](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@dash5000](https://discuss.elastic.co/u/dash5000)\
**Post date:** [January 25, 2022, 6:01pm UTC](https://discuss.elastic.co/t/sorting-a-field-on-the-view-mode/295251/5 "2022-01-25T18:01:23Z")

</div>

@ghudgins  
Ah thats weird.  
The version i am using is 7.16.1

---

<div class="post-metadata">

**Author:** ![ghudgins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghudgins/32/138532_2.png) [@ghudgins](https://discuss.elastic.co/u/ghudgins)\
**Post date:** [January 25, 2022, 9:15pm UTC](https://discuss.elastic.co/t/sorting-a-field-on-the-view-mode/295251/6 "2022-01-25T21:15:11Z")

</div>

what's your formatter on that index pattern (will be called data views in 8.x)...mind sharing some details or a screenshot?

---

<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:** [February 22, 2022, 9:15pm UTC](https://discuss.elastic.co/t/sorting-a-field-on-the-view-mode/295251/7 "2022-02-22T21:15:43Z")

</div>

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