Can You solve my repeating group Problem?

Can your brain and experience give me some good guidance or even better, a solution?

Thank you for taking your time to look at this. It has had me stumped for some time now. Here is the rundown…

This is a simple classified app. Users can create multiple listings. Each listing has the normal stuff such as a description, pictures, captions for pics, and some bits of info. I have included a diagram of my database. I do hope it makes sense.

On the homepage of the app there is a repeating group doing a search for all MEDIA (data type). This allows me to display pictures or video in each repeating group cell and users can browse through the pictures of all of the listings. This is much like any other classified app in existence.

THE PROBLEM… In each cell of the repeating group there is a single picture or video but I also want to have additional information in that cell such as the address of the listing. The listing address is stored in the LISTING (data type) and no matter what I try, I can not figure out how to retrieve that information.

Seeing that I am doing a search for MEDIA (data type), I can easily retrieve the MEDIA CONTENT (data type). I am guessing that this is due to the MEDIA CONTENT is a child to the MEDIA?

SOLUTIONS THAT I HAVE TRIED…

  1. Adding a field in the MEDIA (data type) that is labeled “Original listing” and having that link back to the LISTINGS (data type). This does not work
  2. Trying every possible combination of dynamic data to get the "MEDIA’s Creator’s Listing’s Address… This does not work
  3. Tried having the repeating group do a search for LISTING (data type) and then displaying the MEDIA (data type) of that Listing. This does work however it only displays one cell in the repeating group per LISTING (data type) and this makes it so I only can display one picture/video per listing. So if I have 10 total listings on app and each listing has 10 pictures there should be 100 cells in the RG. If I do a search for LISTINGS (data type) it will only display 10 cells in the entire RG. I want the RG to display all 100 pictures that the app has with one picture per cell.

Can you please tell me what I am doing wrong? How do I do a repeating group search for MEDIA (data type) and also recall information that is stored in the LISTING (data type)?

Thank you in advance. I will gladly paypal you beer or lunch money to whoever helps me figure this out.

Switch your MEDIA repeating group to the LISTING data type, searching for all listings. Inside the cell have a picture element referring to Current cell’s Listing’s Media’s Media Content’s Picture. (If this is a list just have another repeating group displaying the list)

This allows you to have some other text elements inside the cell referencing the Current cell’s Listing’s Address, etc.

Tylerboodman- Thank you very much for replying.

I have tried this. I touched on it a bit in the original text in the post.
For example: If I have 10 listings and each listing has 10 pictures
If I do a search for the LISTINGS, it will only create 10 cells in the RG (to display the 10 LISTINGS). I would have to do a RG inside of each RG cell to display all of the pictures of each listing. This would look very sloppy. You would scroll through 10 pictures of the same listing until you got to the next listing.
What I am looking for is a RG that randomly (or filtered) displays a single picture from a listing in each cell and that same cell has some information displayed. The user the can click that picture and then see the entire listing.
I really appreciate your time and input but it is not really what I am looking for. Thank you again.

Okay then I recommend putting a Listing field (datatype is Listing) on the your Media datatype.

As a general rule the child should have a link back to its parent so you should have that link for reasons like this :+1:

Tylerboodman… once again, thank you so much for taking your time to reply. It means a lot.

As for as the link back to the parent, I tried exactly what you just suggested (stated in original text) however it will not work. Maybe I am doing it incorrectly? I will try again but nothing happens when I do what you suggested (linking back to parent). I will try now and get right back with you.
Thank you again!

Upon creation of the Media, make sure you fill in the relevant Listing so it has the link back. The datatype for the field will be Listing (not text). So make sure once you made a new Media the field is properly filled in your database. Existing things in your database will not have this field magically filled in so maybe that’s what you are observing?

Then when the user click on the Media in your repeating group you can send the user to a Listing page with the Current cell’s Media’s Listing (or open a popup, something else,etc)

Tylerboodman… Thank you once again for your help. I can not stress enough that your time and brain means a lot to me.

So when it comes to the child MEDIA linking back to the parent LISTING I tried that before and I also tried it again right now.

In the MEDIA data I created a field named “original listing” and the field type as LISTING (type), linking it back to the LISTING datatype.

I will walk you through my RG… The RG does a search for MEDIA. In the RG cell, there is one main group and this displays MEDIA. Inside the main group there are two smaller groups displaying various data. One of the groups displays pictures (works correctly). The other group is the group that I want to display the data that is stored in the LISTING datatype. I will refer to these two groups as the picture group and the info group.
On info group I set the “Type of content” to LISTINGS. Data source is set to "Parent group’s MEDIA (type)'s ORIGINAL LISTING. This works perfectly and all of the text lights up to blue.

I then go through and set the text in the Info group to retrieve the dynamic info that is found it the LISTING datatype and all of the text lights up blue.

When I go to preview the RG, there is no data related text showing what so ever. Just nothing.

After this I tried making a new listing (due to you suggesting that existing “Things” will not have this redirect in them… No luck
I then logged the user out and in and created a new listing… no luck
I then created a new user and new listings… no luck.
**** I made sure that the LISTING datatype was set as public under privacy *****

I am at a total loss right now. If you have any further input, I would love to hear it.

Here is how I structured the MEDIA datatype with the loop back to the LISTING datatype

Your structure sounds correct, have you gone to your database and made sure the LISTING is being filled in on your MEDIA type? I just want you to make sure the link is being created. You have to add that in your workflow when a new media is created that it sets that field.

Then make sure your text has a enough height/width to actually show the data. If the text element is shorter than your font size it might just go invisible

Tylerboodman!!! You figured it out!!! I just took a look and it is not linking back/filling in the MEDIA/Original Listing in the database. Here is a screen shot…

Would it be too much to ask for professional input on how to link this? I have a few ideas but if you have an idea or have done this before, you would really be helping me out.

Once again, thank you for your time and your knowledge!

So this link will not magically happen, whenever you have a “Create a Listing Media (Type)” step, you need to set that Original Listing field to the relevant Listing. I’m not sure how you are creating these Media types, is it a Listing page where the user adds new media?

For now just make sure this is working for future ones, after that you can create a “cleanup” workflow to set any previous ones

Thank you so much. I will have to go through and figure out how to make this all happen when the user creates a new listing. The MEDIA is created in the same steps/form as when the LISTING is created. I will figure it out.

Can you please shoot me your paypal address so I can buy you lunch? It would really make me feel good. You have no idea how much you helped me out today.

:grinning_face_with_smiling_eyes: Don’t worry about it this is just Bubble database/thing relations…

Okay if your Create a Listing step and Create a Media step are in the same workflow, then on the Media step set it’s Original Listing field to Result of step (your Create a Listing step number)

SO SO SO PERFECT!

You really helped a person that was struggling with a problem for over a week.

Thank you once again.

1 Like