Nested Repeating Groups: Group Jobs by Month, Then by Date

I’m trying to structure a repeating group to display upcoming jobs, grouped first by month, then by day, and finally listing the jobs for each date. The goal is to have the current month’s jobs at the top, with today’s jobs listed first, followed by future dates in order. Each month should act as a section header, with its respective dates and jobs nested inside. What’s the best way to set this up using Bubble’s repeating groups?

I’ve been using “Group By” to successfully organize jobs by month, but I’m having trouble correctly grouping them by specific days within each month

Example

:date: February 2025
├── :calendar: Feb 12 (Today)
│ ├── :open_file_folder: Job A
│ ├── :open_file_folder: Job B

├── :calendar: Feb 13 (Tomorrow)
│ ├── :open_file_folder: Job C

├── :calendar: Feb 20
├── :open_file_folder: Job D

:date: March 2025
├── :calendar: Mar 2
│ ├── :open_file_folder: Job E

├── :calendar: Mar 15
├── :open_file_folder: Job F

:date: August 2025
├── :calendar: Aug 13
├── :open_file_folder: Job G

I created a demo with an approach you can take. There’s a hidden repeating group acting as the primary source, then it’s nested RGs with filters.

Take a look at the editor: coaching-sandbox | Bubble Editor

Here’s the preview: https://coaching-sandbox.bubbleapps.io/version-test/jobs-folders?debug_mode=true

Hopefully this gets you going!

Cheers,
Gaby
Coaching No Code Apps

1 Like

Thanks Gaby!

1 Like

Hey Gaby,

I made a small adjustment to the database by setting the date availability as a list, which allows selecting multiple job dates for jobs that span more than one day. However, I lost the ability to filter the job dates to be greater than or equal to the current date (rounded down to today). Do you have any suggestions for how I should set up the reference repeating group now?

It might be better if you use a date range field rather than a list of dates. That way, you can do this in the reference search (I updated my demo):

But let me know if list of dates is actually more appropriate if jobs can have non-consecutive dates.

Hi Gaby, I think a list of dates would be the best fit for my use case. A job might occur on the 21st, 22nd, and then recur on different dates after that. I assume this wouldn’t be the ideal scenario for using ranges? Sorry for the inconvenience thanks again so much for taking the time to help me

Got it! OK, this was fun. I updated the demo page again. I show the reference RG to help visually confirm the right jobs are showing for the right dates.

The Job data type has a List of Dates field and a “Max Date” field which helps the initial reference search only return jobs today and forward.

From there, every RG level has a filter, but you’ll see now we’re using advanced filters in some cases since this structure is a bit more involved that a single date.

Check it out! :slight_smile:

1 Like

I think this will work perfect for me!

1 Like

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