# Another way to sort group name and item name inside a collection

**URL:** <https://community.glideapps.com/t/another-way-to-sort-group-name-and-item-name-inside-a-collection/78879>\
**Category:** Community Resources\
**Tags:** tutorial, collections, sorting-method\
**Created:** [December 31, 2024, 7:10pm UTC](https://community.glideapps.com/t/another-way-to-sort-group-name-and-item-name-inside-a-collection/78879 "2024-12-31T19:10:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [December 31, 2024, 7:10pm UTC](https://community.glideapps.com/t/another-way-to-sort-group-name-and-item-name-inside-a-collection/78879/1 "2024-12-31T19:10:01Z")

</div>

Edit:  
My bubble has been burst by @Atom 🤣 Thanks for the link:

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/0/70418ea7c3ee140854dc3a6430a47bb88652474b.jpeg "Glide: Grouping and Sorting TIPS and TRICKS") ](https://www.youtube.com/watch?v=I9Jc0LwFX6Q)

Context:

> [@Sort a group alphabetically](https://community.glideapps.com/t/sort-a-group-alphabetically/62233/2):
>
> The new Query column can do this for you. Create a Query column targeting the data you want in your Collection, and define a sort column Use the Query column as the source of your Collection, and sort the Collection using your Group By column.

I discovered a new method for sorting elements within groups and sorting the groups themselves:

1. **Create a Template Column** : Combine the columns you want to sort by into a single template. For example:  
`GroupName (a number if you want to control the order of groups) - ItemName`.
2. **Use the Template Column for Sorting** : Apply the template column in the “Sort Group By” option of your collection.

This approach simplifies managing both the group order and the order of elements within each group.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/5/75537eede57ab405a4baac39384f4c24fb82c883.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/1/612c834a236aea64804d3fb04574c58b97b1fcf6.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/e/8ea8f6556d0e50b24e6cd653f2419afffdcef690.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/f/6fc8c73844ece86f53ea7db9c55b7a61140d7a4c.png)

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [December 31, 2024, 7:27pm UTC](https://community.glideapps.com/t/another-way-to-sort-group-name-and-item-name-inside-a-collection/78879/2 "2024-12-31T19:27:04Z")

</div>

My bubble has been burst by @Atom 🤣 Thanks for the link:

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/0/70418ea7c3ee140854dc3a6430a47bb88652474b.jpeg "Glide: Grouping and Sorting TIPS and TRICKS") ](https://www.youtube.com/watch?v=I9Jc0LwFX6Q)

---

<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:** [December 31, 2024, 7:51pm UTC](https://community.glideapps.com/t/another-way-to-sort-group-name-and-item-name-inside-a-collection/78879/3 "2024-12-31T19:51:02Z")

</div>

Yeah, I’ve done this a few times. Just need to be careful if using numbers in your template because numbers will be sorted as text instead of numerically (ex. 10 comes before 9 because 1 is smaller than 9 alphabetically, whereas 09 and 10 would sort correctly). When using numbers, which are converted to text, you need to zero pad them so they are all the same length, so they will sort correctly.

The other thing to watch out for is to make sure the character used as your delimiter comes after any other character in Unicode order. Otherwise it may sort incorrectly. I think a dash (-) is fine but I’ve never taken the time to look over the Unicode ordering of characters to figure out which is best.

In most cases it should work fine, but those are a couple of things to look out for.

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [December 31, 2024, 7:51pm UTC](https://community.glideapps.com/t/another-way-to-sort-group-name-and-item-name-inside-a-collection/78879/4 "2024-12-31T19:51:22Z")

</div>

Good catch!

---

<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:** [January 1, 2025, 2:00am UTC](https://community.glideapps.com/t/another-way-to-sort-group-name-and-item-name-inside-a-collection/78879/5 "2025-01-01T02:00:55Z")

</div>

I usually just convert them all to a single number, and structure my math around which column should be prioritized for sorting.

---

<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:** [January 1, 2025, 2:26am UTC](https://community.glideapps.com/t/another-way-to-sort-group-name-and-item-name-inside-a-collection/78879/6 "2025-01-01T02:26:10Z")

</div>

> [@ThinhDinh](#):
>
> I usually just convert them all to a single number,

Same 👍

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [January 1, 2025, 3:05am UTC](https://community.glideapps.com/t/another-way-to-sort-group-name-and-item-name-inside-a-collection/78879/7 "2025-01-01T03:05:05Z")

</div>

> [@Jeff\_Hager](#):
>
> The other thing to watch out for is to make sure the character used as your delimiter comes after any other character in Unicode order. Otherwise it may sort incorrectly. I think a dash (-) is fine but I’ve never taken the time to look over the Unicode ordering of characters to figure out which is best.

If you consistently use the same character combination, such as " - ", for every element, it should work fine.
