Saving Repeating Group Items to Database - Please Help!

My app is a project management database. In this ‘Add New Project’ form, the ‘Master Phases’ repeating group pulls data from its own database. The repeating group next to it, ‘Project Phases’ holds whatever Master Phases the user selects and assigns them a project. Certain phases can be edited, which is why the field is an input. There can be up to 150 (maybe more) Phases assigned to a project. I have also created new fields (+Add Fees, Status) in the ‘Project Phases’ repeating group where the user can assign a fee and status to that particular phase.

What I need is:

When the ‘Save’ button is selected, all of the fields above the Master Phases table are added to the database (I already know how to do this). Additionally, I need each selected project phase in the repeating group and its associated fields in the ‘Project Phases’ repeating group to be added, but I can’t figure out how to do it.

Here is a link to my Editor:

Hi Calicass,
I have a similar issue - but I am failing in the first step itself: “When the ‘Save’ button is selected, all of the fields above the Master Phases table are added to the database (I already know how to do this)”
I don’t know how to do this - can you let ,me know please. I want to make changes in individual values in the repeating group and all at once, I need to save it to the database - each change to be recorded against each row of the repeating group.

Hi there. I wish I could help, but I am also a newbie…I don’t want to give you wrong advice. I would suggest starting a new thread with your question. :slight_smile:

1 Like

Can anybody help? This is an integral part of my app and I’m still stuck.

Method 1 (easier): As you create each new phase in the RG, create it in the database at the same time. Then on Save, they can all be associated with the same project (project’s list of phases).

Then work out how you want to get rid of them if Save isn’t pressed.

Method 2: schedule a API workflow on a list, to create each phase. Several downsides include being slow, and no direct feedback to the page when the records are created.

So, I’m using a checkbox to assign master phases on the left to the project. How do I do a workflow to create it in the database based on the checkbox being checked?

If you have a workflow triggered on the checkbox changed event, you can reference current cell’s thing in the workflow steps.

This video is on a very different use case BUT what I show covers this issue (how can we/should we add an item via checkbox in a repeating group) you are interested in… lots of interesting tips in here and it will likely help you:

Also, it’s really funny to watch me Bubble in real time.

Probably the easiest way of doing this is to create the Project BEFORE you go to the “New Project” page - with a status of “Draft”.

Then you can add “Phases” as their own thing to a list of Phases on the Project.

When the user does a “Save” you update the project to have a status of “Live”.

You can either leave the “Draft” projects around, or set a regular sweep up and delete them.

Much easier than trying to save lists of stuff.