How to seperate a list on database to display on seperate rows on an RG

I have report data type with two fields of subheading and sublevels both are list type

on the backend of database they look like this:

and when I display them on a repeating group it shows this:

Which shows everything in a single row.

But what I want to achieve is something like this:

I am using here display list in workflow so it works. But what I want to happen is to save it on DB and display it through RG by fetching data on the DB

I tried doing this and it works but only for the subheading fields. The problem is that I also want to include the sublevels field which I can’t do because I can only use one data source.
image

I’ve been doing this for 2 days and to no avail. I appreciate all the help!

Is there a reason your DB is set up this way? The simplest way to solve this is to create a datatype called something like “sub” or whatever and then add those sub’s to your record in the report data type.
The way you currently have it is doable but it’s much trickier to implement/explain how to implement.

2 Likes

I agree with @paul29, make a new datatype. This will be a mess if you have everything in list fields.

3 Likes

Can you please explain how can I add the SUB datatype into a record in the report data type?
I already created a seperate sub datatype as you said but not sure what to do next.

Thank you very much!

In your report data type, create a new field and when you choose the type from the dropdown, instead of choosing “text” or “number”, there will be an option to choose “sub”.

Then, in your workflow, where you are creating a new report or making changes to an existing report, you can add the “sub” to the report by either setting the field to the result of step x or one of the couple other ways that bubble allows you to do this. I have no idea how you have your logic set up so can’t say for sure.

1 Like

I manage to figure out the database part
so the next part is displaying it:

so inside the main repeating group REPORT then inside I search for Outlines with 2 separate RG on the left for the sublevel and on the right is subheading. Is that the way to go?

You can see the screenshot below is from the left side RG to display sublevels

image

This one is on the right side RG to show subheadings:

image

I split them with “,”

and this is the results:

Is this the way to go?

I appreciate if you have time to take a look inside my app:
semanticoutlines | Bubble Editor

In short, no, your approach is not correct. Bubble makes this much easier than what you have done. I fixed it for you. I created “RepeatingGroup Outlines copy”. Take a look at how that is set up.

I would recommend watching some youtube tutorials on how bubble data types work and working with repeating groups. Having a good understanding of this is crucial to building solid apps in bubble. What you did, while it technically works, is not only much harder to build out but is incredibly CPU intensive both server side and client side and will make the app incredibly slow if you have more than 100 items in your database.

2 Likes

This. Sorry.

Hi @NigelG
I’m not sure what you mean by “This. Sorry”. Are you talking to me or @rccanlas2 rccanlas2?

I was totally agreeing with you that @rccanlas2 has done it very inefficiently with those two lists :slight_smile:

Sorry he has to redo his app, but it will pay dividends in the long (and short and medium) term.

1 Like

Oh I see. Cool.

1 Like

THank you for the recommendations! I had tweaked my RG’s and I think so far it is more optimized :slight_smile:

1 Like

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