Data Structure Problems with a Podcast App

Hey everyone, I’m hopeful someone can help as I’m at the stage where I’m ready to pull my hair out…

I’m having difficulties with my app and wondering if the origins of the problems I’m having are bigger than ‘workflow’ based— it could go back to the data structure and how I’ve setup my databases.

Context:

I’m working on a podcast app and would like to have a list of ‘shows / podcasts’ that when clicked, enter into the next page showing a list of ‘episodes’ for that Podcast. When the ‘episode’ is clicked, I’d like to load a new page unique to that specific episode. I’m using repeating groups for this and have got it working up to a point.

So far I can get this to work [see page ‘PODCASTS’],


but when I click through to the next page, I encounter problems.

As you can see in the image above, nothing is loading (I’ve edited and tried to fix it so many times it needs to be completely rebuilt at this point). I’ve had this Repeating group working to the point where it would load a list of ALL Episodes, but they are not split up by ‘parent’ podcast.
IE: Joe rogan Experience show has episodes from ‘No Code Podcast’ as well as ‘Joe Rogan’

I’m looking for guidance on how I could set this up. I’m also wondering if I have my data structured properly (and if this might be the source of my problems)

Regarding the database:
I have a database for ‘Podcast’ with the following fields

my thinking is that this is the list of fields pertinent to the ‘podcast’ data type: List of episodes, the PODCAST* description / PODCAST* Thumbnail / PODCAST* Title. I then have a SEPERATE database for EPISODE, where I capture similar data but specific to the Episode (rather than the Podcast)

*nb: these fields are different from EPISODE- Description / EPISODE - thumbnail / EPISODE - etc…

How can I pass this data along from one page to another?

What is the proper workflow for this to maintain the parent / child relationship?

What should my repeating group in the “EPISODE DETAIL” page look like?

Further, I have all the data setup such that the actual media content (the audio file for the podcast episode {episode - MEDIA CONTENT in the db}) is a separate database. I’ve done this with the thinking that if I can call this specific data only when required then I wont have to constantly pass this throughout various parts of the app where it is not needed, and performance will be better.

Please advise if this is best practice.

Many thanks for your help and advice fellow Bubblers!

A question I have for you is the use of a separate page. Do you have to use a separate page?

I have found it a lot easier to pass data to groups on the same page and not mess with trying to pass data to another page.

I would encapsulate your RG of podcasts in a group and then have a group that contains an RG of episodes. When the “select podcast” button (or whatever you use) it toggles the Podcast RG to hide it and toggles the Episode RG to show it, in the same workflow as a step 2 you’re going to Element actions -> display data (under group). That will pass the data and make you able to set the RG to show episodes of the selected (podcast).

If you need help pm me and I’ll be more than happy to assist you. I’ve created a saas program that uses a huge database and RG for a lot of items and pass data into each.

1 Like

Many thanks for the reply!

You’ve presented a new scenario that I hadn’t considered and I think this could be a good option. I will work on this today as I think this could help work around my issue.

Eventually I will need to go to a new ‘page’ at the “Epidose Detail” stage as there will be lots of functionality on this page that will be specific to the episode-- user upvotes / comments / other social functions.

many thanks for the help and offer-- I will DM you if need be!

What is the content-type of your ‘Show Overview’ Page?

No problem, glad I could help. Episode detail would also be in another group that toggles, or you can create a custom event that sets the state of the group and sends that parameter to the url and then have conditions that if url has “episode detail” then group is visible.
I would limit the need of passing data across pages unless it’s just absolutely necessary, bubble does a decent job with loading everything when its built this way. Also if you look at some templates alot of them have massive amounts of hidden and toggled groups.

I would utilize groups as “pages” when dealing with data selections from one group to another.

Use actual pages when the content of the page is different. Ie admin(user setup, info etc.) podcasts(shows, episodes, details).


You can see form above picture: Content is set to “Podcast” with “current Page Podcast” as the source. nb: this is for the RG not the page.

Seems to be working as it’s pulling “current page podcast- TITLE” and " Thumbnail" through:

So, the page content type is set to ‘Podcast’, and that’s being passed correctly from the previous page…

You ‘Group Podcast’ you’ve shown above has the current page’s Podcast as it’s datasource - what’s the datasource set to for the repeating group?

RG Data source is “Current Page Podcast”

Just ‘Current Page Podcast’?

What content type is the RG set to display?

I was under the impression you’re trying to show a list of ‘Episodes’ in the RG?

In which case the data source needs to be a list of ‘Episodes’ - currently you’ve got it to be a single ‘Podcast’?

Perhaps I’ve misunderstood what you’re trying to do…

But if you’re trying to show a list of episodes in the RG relating to the current page’s Podcast, then the content type for the RG needs to be set to ‘Episode’ and the data source should be ‘Current Page’s Podcast’s Episodes’

Blockquote
But if you’re trying to show a list of episodes in the RG relating to the current page’s Podcast, then the content type for the RG needs to be set to ‘Episode’ and the data source should be ‘Current Page’s Podcast’s Episodes’

This has been my thinking as well. I’ve tried to set this but have been unable to set the “current Page’s Podcasts Episodes”

(it goes red)

If the data structure is correct then it will work.

If it goes red you’ll also get an error message on the issue checker telling you what’s wrong (most likely a datatype mismatch). So what does it say?

I notice you’ve got 2 fields with the same name ‘Episodes’ on your Podcast Datatype so make sure you’re setting the correct one (I’d rename one of them if I were you to avoid any confusion).

I’ve given this a crack and (in current iteration) can get it working up to the point where I’ve got the RG toggling from ‘Shows’ ->‘episodes’

I had it working where it would bring in data from EVERY episode and display it but have worked backwards from this point trying to fix.

Would love to take you up on your offer- any chance I could grab a hand from you?

Yep, be my pleasure, if you have a personal plan you can add me as a collaborator, or if not make it public so anyone can view and pm the link.

Many thanks for the offer!
Unfortunately doesn’t look like I can DM.

Workflow to find the problem is : (at bottom footer menu) “Discover”->"podcasts"->"view show" (which should then show a list of episodes for that show

I’ve opened up permissions but please let me know if you have any difficulties

Its working now, hop on and take a look.

amazing.
Thank you so much–truly!!

I’m going to do a deep dive tomorrow and look at everything so I can better understand what’s going on.

THANK YOU!!

You are welcome, if you need anymore help just give me a shout.

1 Like