Forum Academy Marketplace Showcase Pricing Features

Combining fields into one

So I have something like this.

A user has 3 projects.

Project has 3 objectives.

Each objective has 3 specific subobjectives.

Each subobjective has 3 specific ideas.

What I want to do is combine all the ideas, that are under 1 project, into an “Idea overview” repeating box on it’s own page.

Right now when I attempt to do this I get a repeating box with all ideas from every project, rather than the one being worked on.

Please advise in NOOB terms a solution. Thanks.

Go create a repeating group.

Then put text boxes inside this repeating group. Use dynamic input on each text box to call the “Current Cell User’s Projects / objectives / ideas”.

It sounds like you need to better define the source for the repeating group. You could “Do a search for current user’s projects” or you could do “Current Page’s Projects” or “Send data to group” depending on how you have your app set up.

How do you send data to group?

I am trying to do it through the current page’s projects and drilling down but nothing is actually populating the screen must be a disconnect somewhere.

Where objectives is a list of objectives under type project

where subobjectives is a list of subobjectives under type objective

where ideas are a list of ideas under type subobjective.

From the project main screen if I want to display a list of all ideas from all subobjectives of that project how would I do that? Would I make ideas a field under type project? Then make changes to two things when I create a new idea "project - ideas AND subobjective - ideas? Or am I overthinking this?

if you have a repeating group, you can set Type to Subobjective and for Source set a Query for Subobjective with constraint that Subobjective’s Objective’s Project = Page’s Project, assuming the Page’s Type is Project and you passed a Project to that page when you navigated to it

this means though that you have to keep back links (two-way connection) in your Types

that is Objective has a list of Subobjective, but Subobjective also has an Objective property that points to their parent

when you create a Subobjective bubble has the option to set a field of that new object instance so you can tell it there to do Objective = Page’s Objective, assuming the Type of the page where you have the Add Subobjective button is Objective (and it shows a Repeating Group of Subobjective)

I use this data design a lot at http://bubble.is/site/cpa as I’ve already mentioned at other thread

see a clone of its source code made public at https://bubble.io/page?id=cpa_opensource (please clone that if you want to play arround, don’t do changes to it)

I see the objective and subobjective but what about when we throw subobjective “ideas” into the mix.

So then Subobjective would have objective as a field of type objective?

And idea would have subobjective as a field of type subobjective?

Now how do we gather and display all the ideas of all subobjectives into a single repeating box?

Would we have to link the idea back to subobjective, then to objective, then to project? OR just a simple link back to subobjective will do the trick?

No, just back to its parent object. In fact this is not needed for all subobjects, only for objects involved in cases like this.

you have to be careful though to set the backlink when you create a new object (and delete or fix manually all preexisting objects you have in your database if you want to keep them)

btw, the Data tab has a view on App data and shows separately the Live and the Development (for Preview mode) data instances (they’re separate databases as it seems).

Ok this is starting to make sense. Another NOOB question though is. How do you set the backlink when you create a new object?

How would I then fix preexisting objects to be backlinked in the database?

see screenshot:

you use “+ Set another field” at “Create a new item…” action

You can use the “Bulk Action” function on the Data Tab to do this. You would write an API Workflow to fix your data.

An alternative to this is to have an “admin” page that has a button that does this sort of thing. I have an admin page with loads that fixed data as I evolved.

Regarding having an admin page to do it, do you mean you can call the Bulk Action from the app’s UI workflows too? I thought you can only use Bulk Action from the Bubble designer’s Data tab (judging from the text in the reference)

Else I could use that to fake loops (e.g. to prepare a report in my Class Project Assistant [CPA] app for a certain project [it has to spit out all Tasks and Teams and all the Team Members of those in a report])

1 Like

Now that I have the parent thing figured out I have a better way of asking the original question.

If Repeating Box Set A has a set of items, call them Class A widgets. This is on page 1

and Repeating Box Set C has a set of values, which are Class A widgets also. This is on a different page, say page 5.

There are also Class B widget repeating boxes on other pages.

How can I combine all the Class A widgets from Repeating Box Set A and Repeating Box Set C and have them on the same Repeating Box “D” which serves as an overview of all Class A widgets?

when you right click an item it has option “Copy with workflows” and then you can paste in the template (first) row of a repeating group using right click and “Paste with workflows”

an issue with this approach is that if you later on evolve the code at its original place you’ll have to replicate your logic changes where ever you also copy-pasted it (classic issue with copy-paste reuse)

that’s why Bubble has Reusable Elements that you can define. Those accept a Type’d parameter and can encapsulate workflows so that they don’t clutter the workflows of your pages and they’re reused (they’re treated like parametric blackboxes in pages)