Need help passing repeating group data to a workflow

New to Bubble and I can’t figure out how to create records for a repeating group.

I have a repeating group on a form with “Events” displayed that is a list of Events in a database of Events. But in the repeating group on the form I have added check boxes for “Summer”, “Fall”, “Winter” and “Spring” so that for each event, the user can specify what time of year they are interested in the Event. The seasons are not part of the Events database.

I have a table called “Inquiry Events” that stores these selections and I need to create a record in and update each record with the Event, Summer, Winter, Fall and Spring data.

How do I read the repeating group that consists of the “Event” and Seasons, pass these values and create the “Inquiry Events” record in the database for each event in the repeating group?

Unfortunately data within repeating groups is fairly well hidden from external workflows and expressions. One way is to use a plugin that can reference the data in each cell in the repeating group, and collect the data that way - I personally use BDK’s RepeatingGroup tools to do this: RepeatingGroup Tools (bdk) Plugin | Bubble

Another way is to just have the fields themself auto-bind - although based on how you’ve described your data structure and the way you collect & store it, that may not work for your use-case.

1 Like

I put my Bubble hat on and thought of another possible solution. What if I create a Custom State on the page for each season (Fall, Winter, Spring, Summer) and make each a list. Then when the user clicks on one of the seasons in the repeating group it updates that seasons custom state with the Event. What i can’t figure out is how do I know what row (event) the user clicked the season column on? How do I retrieve the correct row event to add to the season list?

If I can get that to work then I can create a backend workflow that creates/updates the season settings in the Inquiry Events table for each even contained in each list of seasons.

The custom state list need to be a list of texts…

And each text needs to contain a reference to the ‘row’ of the RG (either the cell index, or the Thing ID), and the reference to the value (whatever that is).

If the value is another thing, then that must be the unique ID (if it’s an option set it needs to be the Display). If it’s a text or a number then it can just be the text or number.

So your custom state list of texts might look like this:


Then you can just split each text by : to get its value or index and use that how you like.

You just need to ensure you don’t have more than one text in the list for each index (so first remove any existing ones, and then add a new one).

An alternative way to get data out of a RG is this:

add a Hidden Input element, with an element ID unique to the cell, and whatever value you want to give it (do this with an html element)

Then using some JavaScript, loop over the items in the RG, retrieve the value from each unique input and output it to a JavaScript to Bubble element as a list (this can contain duplicate values).

Then use that data however you like in your workflow.

There are also plugins (such as Orchestra, or BDK RepeatingGroup tools) that will do this for you - although it can take a bit of effort to learn how they work…

I did figure out a solution for this. It may not be the best but it was easy to do. I simply created a temporary database table in bubble to store the selections for seasons for the user by event. By doing this I was able to generate the table with the events prior to the user accessing the screen and then when the user selects the seasons, they are selecting them right in the temp data file that I can read when they save the form to update the Inquiry table that needs the data. I didn’t want to create a special table just for this but is seemed like the only simple solution.