NOOB question which is very frustrating!

So I have been working for 4 hours on figuring out the data side of this program.

What I am trying to do is have users develop projects. Then those projects have objectives. Those objectives then have sub objectives. These are all on different pages.

A user logs in.
User finds the list of projects they have developed.
User clicks on a project. User is taken to different page where the objectives that pertain to that project are.
User clicks on an objective and is taken to a different page where more information about that objective can be found.

How do I set up a string of ownership like this? Where a user sets up and owns a group of projects. Where a project has independent objectives that are attached to that project? etc.

Maybe I missed something in a tutorial but I am clueless. If someone could even guide me to the documentation or video that explains this it would be greatly appreciated!!!

1 Like

Let’s start from the top. First make a page that lets you create projects and display them. Selecting a project could take you to another page where you can create objectives and display them. As you create these objectives, either store the objectives as a list on the project, store the parent project on the objective, or both. Creating a sub-objective is simply of exchanging project and objective with objective and sub-objective.

2 Likes

Thanks for the feedback. Just a quick follow up. How would I save a list of objectives to a specific project? What would that look like on the workflow? I get what you are saying, but what actions lead to that in practice.

Day two of Bubble so am learning as fast as I can.

Really repeating what Scott has already said.

Your Data will have a Project thing (with a Creator which is the User … you can then use that to filter Project to just "Creator = Current User . that is how a User can simply “Own” a Project).

You will have an Objective thing, and have this as a “List of Elements” field on the Project, of type “Objective”. So you create the Objective, and then use THAT as the field type on Project as a list. Multiple Objectives owned by a Project.

Your “detail” pages would then be set up to have a particular type. So for example Project would have type “project”.

It does in the “Type of Content” field on the PAGE details.

When you select a Project from a list, you navigate to that page SENDing the Project from that cell’s Project.

So then your page can just refer to the page’s parent Project.

1 Like

I appreciate your response. I guess I am still getting hung up somewhere.

“You will have an Objective thing, and have this as a “List of Elements” field on the Project, of type “Objective”. So you create the Objective, and then use THAT as the field type on Project as a list. Multiple Objectives owned by a Project.”

"As you create these objectives, either store the objectives as a list on the project, store the parent project on the objective, or both. "

The above I did not quite get? I wish there was a tutorial on setting up database structures and ownership strings.

I have provided a link to my early model. What errors are you seeing in terms of getting the objectives to pertain to a specific project? Any other advice would be greatly appreciated when you are taking a look!!

Day three and getting discouraged. I got a feeling that this is simple once I see it, just haven’t been able to yet.

Thanks!!

Don’t get discouraged , we are here to help.

Not sure if I can get to your app, so maybe if you could recreate in the forum app (see the Sticky at the top) if your app isn’t public ?

Then we can have a look and advise.

I made the app public. It should open up.

OK, I’m in :slightly_smiling:

So…can an objective be relevant to multiple projects ? Is the creator of the Objective relevant ?

What I think you need to do …

User - a field with the list of Projects on. The Type needs to be Project rather than Text. So remove the two that are there and do this …

On the Project, you want add a field that is a list of Objectives. So the type is Objective.

if you set it up like this, with the “data types” being “field types” on each other…

A USER has a LIST of PROJECTS. A PROJECT has a LIST of OBJECTIVES. This is implemented as I have shown by having a field with the child’s data type as the field type.

When you create your Project, you will add the Project to the list of Projects on the User that owns the Project.

You can then add multiple Objectives to the Project in the same way. You Add to the List. We can show you how to do this when you get some buttons on the screen :slightly_smiling:

Hope that helps, I haven’t made any changes to your app data.

3 Likes

Awesome explanation!!! Thanks buddy, I owe you a beer:)

Ok so I am still having trouble with this issue.

What might make this easier is an example. Does someone have a small sample model which they can share which shows something like

A user logs in

The User has multiple projects specific to that user. These are displayed in a list corresponding to that user. The user can select one of the projects which takes them to a page with a list of objectives for that project.

Each Project has multiple objectives specific to that project. These are displayed in a list corresponding to that project. The user can select one of the objectives which takes them to a page with a list of subobjectives for that project.

An objective has multiple subobjectives specific to that objective. These are displayed in a list corresponding to that objective. The user can select one of the subobjectives which takes them to a page with more information about the subobjective with text fields, POC information, etc specific to that subobjective.

If I could see the workflow and data background maybe it would make sense to me. Since this is basically the nature of all the work I am doing, it is most important to master this first. If I figure this out then you have a new paid subscriber!!

Thanks and Kind Regards,

Brad

Brad Luffy

Paragraph “Each Project has multiple objectives specific to that project. These are displayed in a list corresponding to that project. The user can select one of the objectives which takes them to a page with a list of subobjectives for that project”.

Should read

Each Project has multiple objectives specific to that project. These are displayed in a list corresponding to that project. The user can select one of the objectives which takes them to a page with a list of subobjectives for that objective.

At Data tab:

  1. You define a Type called Project and a type called Objective.
  2. for type Project you add a field named Objectives and set it to type Objective and tick the option that this is a list of items
  3. for type Objective you add a field named Subobjectives (or just Objectives) and set it to type Objective and tick that this is a list of items

that way you can even have infinite nesting of (sub)objectives

1 Like

At UI tab:

You add a page named “Project Info” and double click its empty area to show properties editor and set its “Type” field to “Project”. You add a “Repeating Group” there and set its “Type” field (double-click the repeating group area) to “Objective” and its source to “Page’s Project’s Objectives”

In the repeating group’s first row you add a Text element that you can set to have as value the Parent Group’s Objective’s Title or something (if you have a Title member in Objective type)

You add a page named “Objective Info” and double click its empty area and set its “Type” field to “Objective”. You add a “Repeating Group” there and set its type to “Objective” and its source to “Page’s Objective’s Objectives” (note the 's at the middle one, it’s different from the last one, it means Page.Objective.Objectives if you’ve used OOP languages like C#)

if you copy paste the Text element from the 1st page to the first row of the repeating group in this 2nd page, it will use the same formula (it really refers to the repeating group’s Thing).

Can add also buttons at those repeating groups to go to the Objective Page and add action Navigate-To Objective Info page and pass it as param the repeating group’s current cell’s Objective

also make a reusable element that hosts a back button and put it in both pages and do Navigation.PreviousPage at its event handler (you define the event handlers in the Workflow tab for that reusable element, no need to do then at each page where you reuse the element [it’s practically a reusable Group that hosts its own logic]

1 Like

Do we have to add a field for under type User? For example Project? Or should User not have any fields for this example?

One further question. How do we create the list of projects to choose from before moving on to the project info page? Should I just create a page named Project Options and then set the page TYPE field to User?

If Projects belong to the User (and are not belonging to none, shared/editable by all users), then you don’t need to keep them under the user, but can do a search query for “Project” type and get them all to show in a repeating group at a “Projects” page (that has similar syntax as the one mentioned above, but the Repeating Group has type “Project” and that page has no type)

if you make them belong to user then set the type of the Projects page to “User” and the repeating group’s value to “Page’s User’s Projects”

of course in the 2nd case (per user projects) at Data area first you add to the User type (preexisting type) a field called Projects, of type Project and select it is a list of objects

Oops, sorry, my mistake. I think you need to have a splashscreen page or the login page take you to the Projects or some Home page and via Navigate To action pass the Current User to that page that has type Users, not done automatically

Yeah I have a login page which then takes the user to a list of his/her projects. However I was seeing where the list of projects included every user’s projects, and not just the login user. Which is annoying. Then the same issue happened with objectives. A list of objectives showed every project’s objectives rather then the ones pertaining to that specific project. I am getting there…feel like I am just about to figure it out and something else comes up:)

1 Like

this is cause you asked via a query for all Projects. Don’t need to. Just pass the Current User via Navigate to as a param to the Projects page (that has its Type set to User) and in the repeating group at that page set the Type to Project and the source to Current Page’s User’s Projects (see above on how you model the Data)

Ok I am making progress. I have set a model to share. https://bubble.io/page?name=index&id=learningmodel&tab=tabs-1

If you get a chance please take a look at how I structured the data and the UI. I am still getting all projects no matter who I log in as. Perhaps you can get a better idea from this. Just go to Start Page and run it as two different sign ins and you can see.