Displaying parent's fields in a RG

Hi there,

I’m new to Bubbles, so maybe my issue has a super-easy answer. :slight_smile:

I have a DB of Flats in a Property.

Types are quite trivial:

I want to display on a page a table formatted as following:

     (Apt. #1)    -   (first Resident of Apt.#1) 
     (Apt. #1)    -   (2nd Resident of Apt.#1) 
      ............
     (Apt. #1)    -   (last Resident of Apt.#1) 
     (Apt. #2)    -   (first Resident of Apt.#1) 
     (Apt. #2)    -   (2nd Resident of Apt.#1) 
      ............
     (Apt. #2)    -   (last Resident of Apt.#2)
      .......... 
     (Apt. #last)    -   (first Resident of Apt.#last) 
     (Apt. #last)    -   (2nd Resident of Apt.#last) 
      ............
     (Apt. #last)    -   (last Resident of Apt.#last) 

It should be super-easy, but I can’t do that:

  • if I use a RG with flats, I only get the list of residents of the given flat in a single line (I want it to be split in as many lines as there are residents)
  • if I use a RG with the list of residents within a RG of Flats it still is not the desired outcome.

I’m going crazy on that. I must be missing something obvious.

Any help would be most appreciated.

Try the first option with List of text - replace comma with new line?

Thanks @Jici,

It works great for splitting Lists in different lines, but I would get the Apt.# field only displayed on the first line of a given Apartment, not on every lines.

Result would be:

 (Apt. #1)       (first Resident of Apt.#1) 
                           (2nd Resident of Apt.#1) 
  ............
                          (last Resident of Apt.#1) 
 (Apt. #2)     (first Resident of Apt.#1) 
                         (2nd Resident of Apt.#1) 
  ............
                        (last Resident of Apt.#2)
  .......... 
 (Apt. #last)         (first Resident of Apt.#last) 
                                  (2nd Resident of Apt.#last) 
  ............
                                 (last Resident of Apt.#last)

Not sure exactly how you want thing to display. But the other option you can use is a RG inside the RG.

Yes, but when I do that, when doing a search on Residents, it gets clumsy in the display.

Never mind, I’ve changed my data structure to avoid this issue.

Thanks for helping! :slight_smile:

1 Like

Hi everyone, I am still strugling with this. This issue is not nice when using lists. Lists make things very easy but every time when we need to get the parent of a list things get hard. Anyone knows how to do that?

2 Likes