# Sort columns - GlideTable

**URL:** <https://community.glideapps.com/t/sort-columns-glidetable/26290>\
**Category:** Ask for Help\
**Created:** [May 2, 2021, 5:16am UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290 "2021-05-02T05:16:47Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Augusto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augusto/32/25004_2.png) [@Augusto](https://community.glideapps.com/u/Augusto)\
**Post date:** [May 2, 2021, 5:16am UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/1 "2021-05-02T05:16:47Z")

</div>

Hi there.  
Is there a way to sort a column on GlideTable?  
I have several rows unsorted, and i need to sort them on GlideTable not in the app.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 2, 2021, 5:33am UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/2 "2021-05-02T05:33:36Z")

</div>

~~Do you actually need them sorted in the table, or just in the app UI?~~

duh, ignore that. I can’t read 🤪

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 2, 2021, 12:40pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/3 "2021-05-02T12:40:20Z")

</div>

There’s no way to sort a Glide Table yet.

---

<div class="post-metadata">

**Author:** ![Luke\_Dyer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/luke_dyer/32/12287_2.png) [@Luke\_Dyer](https://community.glideapps.com/u/Luke_Dyer)\
**Post date:** [June 8, 2021, 1:59pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/4 "2021-06-08T13:59:55Z")

</div>

wish I knew this before I started without a google sheet ☹

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 8, 2021, 3:09pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/5 "2021-06-08T15:09:25Z")

</div>

Just out of curiosity, why do you need your rows sorted in the Glide Table?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [June 8, 2021, 3:22pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/6 "2021-06-08T15:22:53Z")

</div>

I’ll share a case I’ve ran into. My particular issue was fixed, so it’s not really an issue for me at the moment, but if you’re building dynamic html tables or quickchart urls, then it is nice to be able to sort since that is logic that is handled in the data, rather than the interface.

I explain an old bug that I found a while back and was fixed, but does present a case for sorting of some sort within the table, or at least through relations.

> [@Relations pull data in random order instead of sheet order](https://community.glideapps.com/t/relations-pull-data-in-random-order-instead-of-sheet-order/19758):
>
> So I ran into something odd. I’m building an app that is using [quickchart.io](http://quickchart.io) . To build the chart I have a relation to link to the data, and then I’m using a Joined List column to get a comma delimited list to build the url for the chart image in a template column. Everything works well as far as building the chart, but one thing I noticed is that the relation pulls data in what appears to be a random order. Since we cannot specify an order on a relation, I would have expected it to at least…

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 8, 2021, 3:35pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/7 "2021-06-08T15:35:00Z")

</div>

> [@Jeff\_Hager](#):
>
> I’ll share a case I’ve ran into. My particular issue was fixed, so it’s not really an issue for me at the moment, but if you’re building dynamic html tables or quickchart urls, then it is nice to be able to sort since that is logic that is handled in the data, rather than the interface.

Actually yeah - very good point. And this is something that’s also occurred to me recently. I do a lot of that as well (building dynamic tables using joined lists), and just a day or two ago I was wondering what I would do when I hit a case where I need to order the data in the table (I haven’t yet).

I haven’t put much thought into it, but I’m not sure there would be a solution for that? I guess if the Glide Table is linked to a GSheet you could sort the GSheet and then sync it, but that wouldn’t help if you need dynamic sorting.

> [@Jeff\_Hager](#):
>
> I explain an old bug that I found a while back and was fixed, but does present a case for sorting of some sort within the table, or at least through relations.

Sorting through relations would be ideal - perhaps a candidate for this weeks live coding session? 😉

---

<div class="post-metadata">

**Author:** ![Luke\_Dyer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/luke_dyer/32/12287_2.png) [@Luke\_Dyer](https://community.glideapps.com/u/Luke_Dyer)\
**Post date:** [June 8, 2021, 4:13pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/8 "2021-06-08T16:13:54Z")

</div>

When entering a lot of data directly into the table I easily forget if I have already entered something. I have been entering duplicate data. Sorting would help me easily view this without individual searches.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 8, 2021, 4:28pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/9 "2021-06-08T16:28:59Z")

</div>

Okay, here is a little trick you can use to help avoid that:

- Let’s say you have a column called “Name”, and you want to avoid duplicates in that column
- Create a multi-relation column that links the Name column to itself (`rel-name`)
- Create a rollup column that does a count via that multi-relation (`count-name`)

Those two by themselves are enough to identify duplicates (`count-name` will be greater than 1), but to make it a bit easier to visually spot duplicates, create a 3rd if-then-else column:

- If `count-name` is greater than 1, then true
- Else blank

So as soon as you enter a duplicate name, that column will immediately be true for that row

---

<div class="post-metadata">

**Author:** ![lawsonk](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lawsonk/32/43869_2.png) [@lawsonk](https://community.glideapps.com/u/lawsonk)\
**Post date:** [August 22, 2022, 9:48pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/10 "2022-08-22T21:48:51Z")

</div>

Just would like to upvote here and say it would be really nice if you could do basic sorting of data in Glide tables.

---

<div class="post-metadata">

**Author:** ![Kellar](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kellar/32/69515_2.png) [@Kellar](https://community.glideapps.com/u/Kellar)\
**Post date:** [January 25, 2024, 6:19pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/11 "2024-01-25T18:19:09Z")

</div>

Bumping this again 😀

---

<div class="post-metadata">

**Author:** ![shane.roach](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shane.roach/32/37142_2.png) [@shane.roach](https://community.glideapps.com/u/shane.roach)\
**Post date:** [January 27, 2024, 4:04pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/12 "2024-01-27T16:04:56Z")

</div>

same here, bump! It’s early 2024… sorting rows, by at least one column, much less any column, would seem a great help in many daily scenarios, but primarily for the simple improved ability to scan and find data visually in a table!

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 27, 2024, 4:32pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/13 "2024-01-27T16:32:44Z")

</div>

We’re working on enhancements for the data editor. If you want to see a sneak peek, check out the open source [Glide Data Grid](https://grid.glideapps.com/) project. 🤘🏻

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [January 27, 2024, 9:14pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/14 "2024-01-27T21:14:46Z")

</div>

> [@NoCodeAndy](#):
>
> If you want to see a sneak peek, check out the open source [Glide Data Grid](https://grid.glideapps.com/) project

Amazing!

🎉 New things I’m excited about:

- Copy down! 👏
- Sorting!

👾 Bug I noticed:

- Relation icon and number icon seem to be assigned to the wrong columns  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/134239871130f770de6786dc8de9fd9a3e56909d.jpeg)

😬 Primary concern:

- No undo! 😱 With copy down, it’ll be SUPER easy to accidentally overwrite data. NEED undo just in case.

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 29, 2024, 4:29pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/15 "2024-01-29T16:29:04Z")

</div>

Great insights! I’d bring those directly to [the issues tracker](https://github.com/glideapps/glide-data-grid/issues).

---

<div class="post-metadata">

**Author:** ![Anton\_Arriaga\_Sierra](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/anton_arriaga_sierra/32/60532_2.png) [@Anton\_Arriaga\_Sierra](https://community.glideapps.com/u/Anton_Arriaga_Sierra)\
**Post date:** [April 9, 2024, 4:43pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/16 "2024-04-09T16:43:45Z")

</div>

Coming back to this…

What can i do then if I have 4 “AREAS”, 20 “CATEGORIES” per “AREA”, and 3 “PRODUCTS” per “CATEGORY” and I want them all arranged alphabetically (First the AREAS, then the CATEGORIES and lastly the PRODUCTS inside them?

To my knowledge I’m only able to pick one of the three options to sort.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 9, 2024, 11:34pm UTC](https://community.glideapps.com/t/sort-columns-glidetable/26290/17 "2024-04-09T23:34:03Z")

</div>

So you still need to sort in the data view, or do you need it for the front end? There’s still no way to sort the data view, but we can help if you only need it for the front end.
