List of things to flow to separate entries in a repeating group

Hello! To try and summarize the issue – a component of my website is travel oriented. The high level workflow is as follows:

  • A User (thing) creates a Trip (thing) by entering a destination, departure date, and return date

  • Clicking the submit button creates the Trip item and takes you to a landing page displaying the trip

  • On this landing page, I have a repeating group. The idea is to have the repeating group display each day in the Trip individually based on the dates entered by the User. The user will then be able to assign specific notes, activities, etc. to one particular day within the trip.

I’ve tried several different ways to do this including date list plugins, variables that save the date range as a number, etc. but I can’t figure out how to get the creation of the trip to generate multiple Days in the repeating group that flow in individually. Is this not possible in Bubble? Is there a workaround?

I appreciate any insight!

You’d need to use a plugin like RepeatingGroup tools to accomplish that. It is $16 but opens a whole new world of possibilities. https://bubble.io/plugin/repeatinggroup-tools-bdk-1543937479653x604756044873203700

Have not tested this, but my thinking would be…

  • You need to have a datatype of “Day”. The datatype “Day” should have fields of Date, Trip (which trip it refers to), User (which user it is associated with), and Notes. This is the datatype that will be used to build the repeating group of Days for a Trip.

  • Add a list field to your Trip datatype to hold a list of Days.

  • When you create the Trip entry, set up workflows to also create the appropriate number of Days. You’d need to figure out the longest number of days you’ll allow. If you decide that the most would be 21 days, then create 21 workflows. The first workflow creates a Day based on the start date. The 2nd worfklow has an “only when” condition to execute only if the difference between the start date and end date is 1 day. As you create the Days, the workflows also need to add them to the list field for the Trip.

  • Then, you can create the repeating group by showing a list of a Trip’s Days. You can create the notes part as a text input that preloads whatever notes are already in there, and lets the user edits and save new notes.

That’s the basic idea. There’s probably a more efficient way of setting up the workflow.

This topic was automatically closed after 70 days. New replies are no longer allowed.