Nested Repeating Group

Hi Airdev team,

I am trying to use Nested Repeating Group block but having some issues despite reading instructions. In the picture below there is only one category and three items repeated “San Fransico Art Hunt” etc.

I would like to use different categories with their own list of things:

Category A

  • Item A
  • Item B
  • Item C
    Category B
  • Item D
  • Item E
  • Item F
    Category C
  • Item G
  • Item H
  • Item I

Categories are defined for each row of data in Bubble, so items can belong to only one category (A or B or C in the above example). How do I achieve it with the nested repeating group block?

Thank you!

Hello @broker !

From what you kindly describe, I gather that the database looks something similar to this:

Category
Title (text)
Items (list of items)

Item
Title (text)
Category (category)

A nested repeating group implies that there are two repeating groups. A “parent” repeating group and a “child” repeating group which of course is nested within the parent repeating group.

The Canvas nested repeating group behaves precisely so, as can be seen below:


One way to show the data as you need it would be to:

  • Set the “parent” RG to be of type of content “category” and its data source to do a search for categories
  • Set the “child” RG to be of type of content “item” and its data source to do a search for items that have their parent group category … or alternatively to do a search for the parent group items (… remember that the parent group is a category :smiley:)

Hope the above helps! :+1:t2: