Clustering repeating group outputs by specific phrases from a list

I have a standard repeating group that is displaying data from a field that has multiple descriptions separate by a comma. The field itself isn’t officially a list of text, but the data entered for the field was via user input from a multiple option text box.

In my app I am displaying timepoints in a project and these timepoints should be nested under these top-level categories which make up this list of text. Users basically choose which of the top-level categories they created to next these timepoints under.

My goal is to create one repeating group but have all the timepoints that belong to each of the top-level categories to be clustered together.

This is what the RG looks like now with simply a filter constraint added:

The catch is that the top-level categories are dynamic - they will be set by the user and are not pre-determined, otherwise doing this would’ve been more straightforward.

So this is what it should look like:


  • Day 1
  • Day 15

Treatment Phase

  • Day 1
  • Day 15
  • Day 22


  • Day 22

and so on…

I am assuming the outer repeating group (follow-up etc.) will be a text field in somewhere (maybe user preference) but the idea is same as below.

Here is my data:

The outer repeating group will be the combination of the keyword fields and getting the uniques of them. The type of this RG will be just text.

Then, the internal repeating group will be showing days this time. And these days will be filtered by the keyword fields if it has the current (outer) cell’s text (which is Followup etc.)

As I said, these Keywords column of the Day table might be coming from somehwere else too. The logic is the same.

This is the output of this structure:

1 Like

Thank you @hergin for taking the time to provide me with this solution. I’ve implemented it and it works well - would’ve have been able to work it using your expression in the outer repeating RG which is what splits up the categories.

One question - do think this would work within a table format with the contents of the outer RG along a column and the inner RG contents nested underneath - here’s an example.

Screenshot 2023-12-28 at 12.24.20

The only issue I thought of is Bubble ability to dynamically create and remove columns.

I think you don’t need a table. Vertical RGs should work with some nice sizing, and it should look like a table. I dont know about dynamic columns if it exists.

I didn’t know about vertical RGs, I looked it up and found below in help docs, so I think there is some form of dynamic columns.

Do I activate this via the horizontal scrolling option in the RG settings?
Screenshot 2023-12-29 at 13.56.16

Yes change the layout of RG from that option. It works exactly same as horizontal. It is just vertical.

This topic was automatically closed after 70 days. New replies are no longer allowed.