Save Repeating Group as a List?

I have a repeating group (billing rates) that gets its data based on the value of a dropdown (either forensic rates or standard rates). What I need is to now save that list of repeating group data (either forensic or standard billing rates) to a new record called ‘Project’ so that each project can reference pre-determined billing rates. I cannot figure out how to do this. Please help?

Yeah, Bubble doesn’t make this as easy as it could be, but there are a couple simple ways to do this:

  1. You can store the data from the RG into a custom state on the page (when the user interacts with it) and then save that to the DB when, say, a user clicks a submit button. This is probably what you want to do in this scenario (but use your judgement of course).
  2. You could also save the data when the user interacts with each cell in the repeating group (RG). This is another simple solution to implement but not always what you want because if the values change a few times sometimes the database updates happen out of order so it’s not in sync with the UI.
3 Likes

Hi I was wondering: how do you save the RG data that’s in the custom state (list) to the database. Do you need an API workflow or is there a way around that?

Same way you save anything in the database. Workflow action: Create a new thing or make changes to a thing. The thing must be of the right type of course (the same type as your custom state has, e.g. a list of texts, a list of Foobars, a list of Users, a list of Questions That I Can’t Even, etc.).

The workflow can be on the page or can be in an API Workflow— whichever you want.

1 Like