# "Dynamic group-by" inline list

**URL:** <https://community.glideapps.com/t/dynamic-group-by-inline-list/14855>\
**Category:** Project Showcase\
**Created:** [August 28, 2020, 1:36am UTC](https://community.glideapps.com/t/dynamic-group-by-inline-list/14855 "2020-08-28T01:36:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AyS\_0908](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ays_0908/32/27349_2.png) [@AyS\_0908](https://community.glideapps.com/u/AyS_0908)\
**Post date:** [August 28, 2020, 1:36am UTC](https://community.glideapps.com/t/dynamic-group-by-inline-list/14855/1 "2020-08-28T01:36:17Z")

</div>

Hi, in case this is not a common workaround, happy to share an approach to have an inline list “dynamically grouped by” a choice component.  
This enables users to choose how to group-by the results of the inline list (+ to reduce the nb of inline list by x if we had 1 by ‘group-by’ criteria)

Challenge:  
I’ve got 1 tab for [Search] and 1 for [Content]; I had to separate them because the [Search] tab displays elements of various tabs.  
In the [Search] tab, I have a ‘choice component’ for the ‘group-by’ options.  
=\> But the standard “group-by” feature of the inline list is linked to the [Content] tab, while the ‘choice component’ is linked to the [Search] tab.

Approach:  
1/ tab [Datalist] - GSheet: List of criteria in 1 column to which will be linked the ‘choice component’ of ‘Group by’ options  
2/ tab [Search] - Glide layout: ‘Choice component’ (with User specific field) linked to [Datalist] of different possible ‘Group by’ criteria  
3/ tab [Content] - Glide databuilder: ‘Single value’ (select ‘first’) bringing back from the [Search] tab the user specific field’s value created by the ‘choice component’  
4/ tab [Content] - Glide databuilder: ‘If-then-else’ to match the ‘Single value’ by each value (entered manually) of the ‘List of criteria’ with the related various columns of the [Content] tab (attention : if the [datalist] criteria are changed, even in orthograph, the change must be also done in this if-then-else)  
5/ tab [Search] - Glide layout: ‘group-by’ the inline list by the if-then-else of the [Content] tab

Of course, @ThinhDinh and other Glide-Kings (@Robert_Petitto, @Jeff_Hager etc) will find a simpler way to do it … and I will have lost 2h for nothing, but now I’m used to it 🙂

---

<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 28, 2020, 5:07am UTC](https://community.glideapps.com/t/dynamic-group-by-inline-list/14855/2 "2020-08-28T05:07:51Z")

</div>

That’s a really cool idea. Can’t think of any way to improve on it. I’ll have to remember this for the future.

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)\
**Post date:** [September 1, 2020, 9:30am UTC](https://community.glideapps.com/t/dynamic-group-by-inline-list/14855/3 "2020-09-01T09:30:42Z")

</div>

This is so perfect. I need this for one of my App. Thank you so much.

---

<div class="post-metadata">

**Author:** ![laureljt](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/laureljt/32/24763_2.png) [@laureljt](https://community.glideapps.com/u/laureljt)\
**Post date:** [April 12, 2021, 2:11pm UTC](https://community.glideapps.com/t/dynamic-group-by-inline-list/14855/4 "2021-04-12T14:11:16Z")

</div>

Does this also allow for multiple levels of group by. So for example If i wanted to group Media and then by author and expose the items.

---

<div class="post-metadata">

**Author:** ![AyS\_0908](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ays_0908/32/27349_2.png) [@AyS\_0908](https://community.glideapps.com/u/AyS_0908)\
**Post date:** [July 29, 2021, 6:48am UTC](https://community.glideapps.com/t/dynamic-group-by-inline-list/14855/5 "2021-07-29T06:48:25Z")

</div>

Thanks master!  
And a new cool thing that I discovered with this technic, is that we can apply it on Charts, to build a dynamic chart with just 1 choice component + 1 chart.

> **[NoCode Prototypes · Glide](https://www.loom.com/share/111fdfeae51444d493634cdef3bd693c)**

Updated simplified approach if the inline list (or graph) data to display are in the same tab than the User Specific data selected via Choice component.

OBJECTIVE  
Display an inline list according to the selection of a choice component (ex. gender) AND grouped by the categories of this selection (ex.woman, man)

SOLUTION  
In the dataeditor:  
_- “User specific” field:_ hosting the choice component selection  
_- “Single Value” field (select ‘First’)_: linked to the “User Specific” field  
_- “IF” field_: with “If Single Value is (‘choice option 1’ entered manually), then (column related to this option), idem for option 2, 3…”  
NB: if the words of the source values of the Choice component are changed, they must also be changed in the “IF” field.

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [August 2, 2021, 1:41pm UTC](https://community.glideapps.com/t/dynamic-group-by-inline-list/14855/6 "2021-08-02T13:41:56Z")

</div>

Would this work with roles enabled? What if one of the roles allows for every row, does this still work?

---

<div class="post-metadata">

**Author:** ![AyS\_0908](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ays_0908/32/27349_2.png) [@AyS\_0908](https://community.glideapps.com/u/AyS_0908)\
**Post date:** [August 2, 2021, 4:14pm UTC](https://community.glideapps.com/t/dynamic-group-by-inline-list/14855/7 "2021-08-02T16:14:32Z")

</div>

Hi, no idea, I’ve never used “row enabled”. Nevertheless, I’m not sure that there is an impact since at the end of the day it’s only a “group by” of an inline list.  
ex. “Client” column has B2C, B2B entries → it groups the results of the inline list by B2B and B2C.
