How can I process a list of records from a SQL database?

I have a Bubble application that I am using to view and edit some information stored in MySQL tables. This works well for the most part but I have run into a problem that I can’t find a good solution for, so I am looking for ideas.

I have a contact with multiple phone numbers, addresses, and email addresses. I want to allow a user to edit the contact information as well as information in the child tables in a single screen in Bubble. I have used the SQL Database Connector to load all the data and display it in a Group (for the fields on the contact) and Repeating Groups (for the child tables). I am using Input fields so the user can change the values. Working with the contact fields are easy but I can’t figure out how to handle the changes for the child tables in the Repeating Groups. Is there a way to iterate over items in a Repeating Group and process them individually?

The closest solution I have seen is running an API Workflow on a list but this does not seem to work in this case. When selecting “type of content” for a repeating group Bubble lists the objects returned from the SQL Connector along with Things and primitive types (text, number, date, etc). When defining parameters for an API Workflow the “Type” field lists Things and primitives, but not the objects from the SQL Connector. It seems like the SQL Connector is not complete in this area.

How can I overcome this limitation? I have only come up with a couple options, both of which are pretty ugly.

  1. create a bunch of Things to use temporarily just to pass to the API Workflow. This is would take a lot of work and any changes to the SQL tables would also require changes to the Things.

  2. put a save button on every single row of every child table. This would be a lot of save buttons and a lot of clicking for the user as changes are made. If they forgot to click one I would not be able to detect that and the changes would be lost.

Are there any other options? I feel like there must be something else I am missing. I looked for a change handler or “focus lost” event on an Input field so I could just automatically save based on that but I don’t see a way to do that. It also seems like there should be other ways to iterate a Repeating Group but I don’t see any other options.

Thanks very much for any ideas you can offer.


I hope you get an answer to this because I’ll be going through the same thing very soon.

1 Like

One way to deal with that (by using temporary data) was suggested by @NigelG in this post How to set values for each cell's item in a dynamic repeating group?. Although in my case that still lead to spaghetti-like mess of SQL insert & update statements, so I dropped the idea.