# 🆕 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:** 10\
**Page:** 4

<div class="post-metadata">

**Author:** ![Fanny\_Ditomene\_Sekwe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/fanny_ditomene_sekwe/32/10112_2.png) [@Fanny\_Ditomene\_Sekwe](https://community.glideapps.com/u/Fanny_Ditomene_Sekwe)\
**Post date:** [March 9, 2021, 9:01pm UTC](https://community.glideapps.com/t/grouping/12711/62 "2021-03-09T21:01:14Z")

</div>

I get it, I guess. What would be the formula then ?  
Please 😷 😭

---

<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:** [March 9, 2021, 9:03pm UTC](https://community.glideapps.com/t/grouping/12711/63 "2021-03-09T21:03:52Z")

</div>

You can use anything. Just put ‘X’ and replace ‘X’ with the value in the original date column.

---

<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:** [October 13, 2022, 6:41pm UTC](https://community.glideapps.com/t/grouping/12711/64 "2022-10-13T18:41:39Z")

</div>

Split this topic on October 13, 2022, 6:41pm UTC

4 posts were split to a new topic: [Grouping function not available?](https://community.glideapps.com/t/grouping-function-not-available/51674)

---

<div class="post-metadata">

**Author:** ![yahya\_banouk](https://avatars.discourse-cdn.com/v4/letter/y/b19c9b/32.png) [@yahya\_banouk](https://community.glideapps.com/u/yahya_banouk)\
**Post date:** [October 30, 2024, 11:44am UTC](https://community.glideapps.com/t/grouping/12711/65 "2024-10-30T11:44:24Z")

</div>

Hello !  
Please, I have a question :  
how can I add a button which groups items by something  
I mean a button in which if someone clicks the items will be grouped by name on date or something ?  
How can I do that ?

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [October 30, 2024, 12:17pm UTC](https://community.glideapps.com/t/grouping/12711/66 "2024-10-30T12:17:40Z")

</div>

**In the Data Editor**  
Let’s say you have a table of items and that table of items you have a category column. By indicating values in that column, you can determine if items will belong to category A, B or C for instance. Where the value is empty, the item will belong to no category.

**Now in the Layout Editor**  
When you display the collection and source it to the table above, you will see your collection of item. In the options on the right, you can group these items by category.

You might have a number of items that are uncategorized. By using a show edit screen (for example) and then a choice component, you can assign a category to these uncategorized items. This can also be done with collection item actions, or a choice component action in table collection. Either way, the basic idea is that by triggering the action (on an edit screen or by setting a column value), you will categorize the item with a click or two.

---

<div class="post-metadata">

**Author:** ![yahya\_banouk](https://avatars.discourse-cdn.com/v4/letter/y/b19c9b/32.png) [@yahya\_banouk](https://community.glideapps.com/u/yahya_banouk)\
**Post date:** [October 30, 2024, 2:37pm UTC](https://community.glideapps.com/t/grouping/12711/67 "2024-10-30T14:37:06Z")

</div>

@nathanaelb  
What i want is create a button for my customers that will helpe them groupe the items by a category  
Let’s say that when the user opens the app, will get a list of item, what I want is provide him a button that will group the list items by a specific category when he clicks on it  
Can you help me with that please ?

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [October 30, 2024, 2:38pm UTC](https://community.glideapps.com/t/grouping/12711/68 "2024-10-30T14:38:51Z")

</div>

I think what I described allows you to do exactly that.

---

<div class="post-metadata">

**Author:** ![yahya\_banouk](https://avatars.discourse-cdn.com/v4/letter/y/b19c9b/32.png) [@yahya\_banouk](https://community.glideapps.com/u/yahya_banouk)\
**Post date:** [October 30, 2024, 2:57pm UTC](https://community.glideapps.com/t/grouping/12711/69 "2024-10-30T14:57:45Z")

</div>

Thank you so much !

---

<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:** [October 31, 2024, 12:05am UTC](https://community.glideapps.com/t/grouping/12711/70 "2024-10-31T00:05:28Z")

</div>

I assume you have a list of “categories” already, and you want to give the users a way to dynamically group your items based on those.

- Add a “group by” column to your user profiles table.
- Add a column of choices for that “group by” column in a table of your choice, I usually store it in a helper table. List them out row-by-row.
- Add a choice component to the screen you need, then point the options configuration to the column above, write to the “group by” column in your user profiles table.
- Go to the items table, add an if-then-else column, if “group by” is “Name” for example, return the Name column, and so on.
- Group your collection by that if-then-else column.

---

<div class="post-metadata">

**Author:** ![yahya\_banouk](https://avatars.discourse-cdn.com/v4/letter/y/b19c9b/32.png) [@yahya\_banouk](https://community.glideapps.com/u/yahya_banouk)\
**Post date:** [October 31, 2024, 4:47pm UTC](https://community.glideapps.com/t/grouping/12711/71 "2024-10-31T16:47:31Z")

</div>

thank you so much @ThinhDinh

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