# 🆕 Grouping

**URL:** <https://community.glideapps.com/t/grouping/12711>\
**Category:** General\
**Created:** [July 18, 2020, 9:40am UTC](https://community.glideapps.com/t/grouping/12711 "2020-07-18T09:40:35Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Gerard\_Fernandez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gerard_fernandez/32/1183_2.png) [@Gerard\_Fernandez](https://community.glideapps.com/u/Gerard_Fernandez)\
**Post date:** [July 20, 2020, 7:49pm UTC](https://community.glideapps.com/t/grouping/12711/22 "2020-07-20T19:49:06Z")

</div>

After grouping by and limiting to x items, after pressing the “see all” , the format is not kept .  
So I have cards and after “see all” a list appears.  
It should keep cards as first items shown.

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 20, 2020, 7:56pm UTC](https://community.glideapps.com/t/grouping/12711/23 "2020-07-20T19:56:20Z")

</div>

Isnt it easier to classify it ‘unassigned’ or something else yourself?

---

<div class="post-metadata">

**Author:** ![V88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/v88/32/90054_2.png) [@V88](https://community.glideapps.com/u/V88)\
**Post date:** [July 20, 2020, 9:28pm UTC](https://community.glideapps.com/t/grouping/12711/24 "2020-07-20T21:28:15Z")

</div>

Sure. Could do that, but feels wrong that some items are missing. This is not a filter after all?

---

<div class="post-metadata">

**Author:** ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)\
**Post date:** [July 20, 2020, 9:32pm UTC](https://community.glideapps.com/t/grouping/12711/25 "2020-07-20T21:32:16Z")

</div>

Well, if you can solve a problem yourself, why not 😉

---

<div class="post-metadata">

**Author:** ![Jeremy\_P](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@Jeremy\_P](https://community.glideapps.com/u/Jeremy_P)\
**Post date:** [July 27, 2020, 3:02am UTC](https://community.glideapps.com/t/grouping/12711/26 "2020-07-27T03:02:24Z")

</div>

Is there a way to sort the grouping labels? I created Group A and Group B, but group B shows up above group A, which isn’t helpful. My groups need to be sorted in alphabetical order, or by an order I determine.

---

<div class="post-metadata">

**Author:** ![V88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/v88/32/90054_2.png) [@V88](https://community.glideapps.com/u/V88)\
**Post date:** [July 27, 2020, 9:10am UTC](https://community.glideapps.com/t/grouping/12711/27 "2020-07-27T09:10:25Z")

</div>

Hi @Jeremy_P I agree there is a small niggle here. To sort the group headings you need to sort the list but that field, but then of course the contents of each group may not be sorted the way that you want. But, if you sort the list the way that you want, then the headings will be sorted based on the list sort if that makes sense. I think that the Glide Team need to make a little tweak to the functionality to address this. Additionally, as noted previously, beware of missing entries if they don’t fall into any of your group categories - they simply won’t show up as there is no “unassigned pot”.

---

<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:** [July 27, 2020, 1:00pm UTC](https://community.glideapps.com/t/grouping/12711/28 "2020-07-27T13:00:29Z")

</div>

You could probably create a template column with the grouping column and the column you really want to sort by, joined together. Set your grouping column for the groups and the template column for the sort.

---

<div class="post-metadata">

**Author:** ![V88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/v88/32/90054_2.png) [@V88](https://community.glideapps.com/u/V88)\
**Post date:** [July 27, 2020, 3:59pm UTC](https://community.glideapps.com/t/grouping/12711/29 "2020-07-27T15:59:38Z")

</div>

That’s an interesting approach. May just try that one. Probably a template named “SortKey” or something similar.

---

<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:** [August 15, 2020, 12:35am UTC](https://community.glideapps.com/t/grouping/12711/30 "2020-08-15T00:35:35Z")

</div>

I just realized today that Grouping can make a really nice Calendar list replacement with a lot more customization. Haven’t done it yet, but thought I’d share.

---

<div class="post-metadata">

**Author:** ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)\
**Post date:** [August 15, 2020, 1:17am UTC](https://community.glideapps.com/t/grouping/12711/31 "2020-08-15T01:17:20Z")

</div>

Great idea 💡 thanks

---

<div class="post-metadata">

**Author:** ![Ed\_Chao](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ed_chao/32/12014_2.png) [@Ed\_Chao](https://community.glideapps.com/u/Ed_Chao)\
**Post date:** [August 15, 2020, 12:43pm UTC](https://community.glideapps.com/t/grouping/12711/32 "2020-08-15T12:43:47Z")

</div>

Thanks for raising this question. I would like to know how the groups are being sorted as well so that I can customize the order of the grouping. It’d be great if Grouping had it’s own Sorting component option!

---

<div class="post-metadata">

**Author:** ![V88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/v88/32/90054_2.png) [@V88](https://community.glideapps.com/u/V88)\
**Post date:** [August 15, 2020, 2:57pm UTC](https://community.glideapps.com/t/grouping/12711/33 "2020-08-15T14:57:17Z")

</div>

@Ed_Chao - Good question! I think that the list is sorted based on the standard list sort and then whatever group the first item belongs in appears at the top, but I can’t be 100% certain.

---

<div class="post-metadata">

**Author:** ![V88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/v88/32/90054_2.png) [@V88](https://community.glideapps.com/u/V88)\
**Post date:** [August 15, 2020, 3:00pm UTC](https://community.glideapps.com/t/grouping/12711/34 "2020-08-15T15:00:19Z")

</div>

@Jeff_Hager I’ve been doing this a lot and my users love it:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/4/4d19d990c3dec70b209584699190f9974c3768f4.png)

---

<div class="post-metadata">

**Author:** ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)\
**Post date:** [August 15, 2020, 3:23pm UTC](https://community.glideapps.com/t/grouping/12711/35 "2020-08-15T15:23:36Z")

</div>

Looks great 👍

---

<div class="post-metadata">

**Author:** ![V88](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/v88/32/90054_2.png) [@V88](https://community.glideapps.com/u/V88)\
**Post date:** [August 15, 2020, 4:05pm UTC](https://community.glideapps.com/t/grouping/12711/36 "2020-08-15T16:05:19Z")

</div>

@Rosewebstudio. Thanks. Only issue I’ve found is that you need to create the Date column in the Google sheet rather than the Glide Data Editor in order for it to format correctly.

My dates usually come from a form submission where I use a “special column” to capture the timestamps of the submission. I then want to group them in the UI.

I have also grouped successfully using “today”,“yesterday”,“previous 7 days”, “previous 30 days” and “older”. For this I use the Google sheet again with its ability to calculate days between “now” and the submission timestamp. My users love this too.

---

<div class="post-metadata">

**Author:** ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)\
**Post date:** [August 15, 2020, 4:09pm UTC](https://community.glideapps.com/t/grouping/12711/37 "2020-08-15T16:09:53Z")

</div>

Good to note, thanks

---

<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:** [August 15, 2020, 5:00pm UTC](https://community.glideapps.com/t/grouping/12711/38 "2020-08-15T17:00:18Z")

</div>

I started playing with this a little bit yesterday. I didn’t need to do a formula in the sheet to format the date. Instead I just set the formatting in the date column and created a template column to “lock in” the date that was formatted within Glide. The template is what I use for grouping. I think the underlying issue is that the grouping will still actually use the underlying timestamp value, so if the days match, but the times don’t exactly match, then they are grouped separately. I did however still need a formula in the sheet to duplicate the date column, so I could have a separate column that I can format in Glide to only displays the time.

Here’s what I have for a quick test so far.

 ![Screenshot_20200815-115114](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/a/a6ad643041baefa74b8082dd96d7208676ef8af6.png)

---

<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:** [August 15, 2020, 5:13pm UTC](https://community.glideapps.com/t/grouping/12711/39 "2020-08-15T17:13:09Z")

</div>

@Ed_Chao I agree with @V88 that the groups appear in the order that your sheet is sorted.

As I mentioned in this post, if you need to sort the group, as well as another column value, then you could create a template with both values. Use the template for sorting and the group column for grouping.

This isn’t necessary for you, but for me I need the groups in a specific order that’s not alphabetical. I have another sheet that contains the groups and their order number. I use relations and lookups to get the sort order number and I use that to build my sort order template column. It’s still grouped by the text, but the whole sheet is sorted by the template column, which contains numbers.

---

<div class="post-metadata">

**Author:** ![spencersRus](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spencersrus/32/69_2.png) [@spencersRus](https://community.glideapps.com/u/spencersRus)\
**Post date:** [August 15, 2020, 8:08pm UTC](https://community.glideapps.com/t/grouping/12711/40 "2020-08-15T20:08:52Z")

</div>

Thanks for your help on this here:

> [@Group by Timestamp Problems](https://community.glideapps.com/t/group-by-timestamp-problems/13766):
>
> I am working on an app where students can share what they learned today. Here is a link to the current prototype: [https://right-stomach-4836.glideapp.io/](https://right-stomach-4836.glideapp.io/) The form writes to the sheet with the current date and the new user given insight. But, when I try to “GROUP” the learning by DATE, it splits it up. (Because in the background it is actually the date AND the TIME (so the app sees each as a different “date”) You can see, I even changed the DATE format to just the date. [image]

---

<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:** [August 16, 2020, 12:47am UTC](https://community.glideapps.com/t/grouping/12711/41 "2020-08-16T00:47:05Z")

</div>

Can’t you group alphabetically by the category that your grouping by?

[Previous page](https://community.glideapps.com/t/grouping/12711.md?page=1)

[Next page](https://community.glideapps.com/t/grouping/12711.md?page=3)
